w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Cocoa finder menu item for folders only
Add the following code to the .plist: <key>NSServices</key> <array> <dict> <key>NSMenuItem</key> <dict> <key>default</key> <string>Folder Handling Demo</string> </dict> <key>NSMessage</key> <string>handleServices</string> <!-- This specifies the selector --> <key>NSPortName</key> <string>Tmp</string> <!-- This is the name of the app --> <!-- Here we're limiting where the service will appear. --> <key>NSRequiredContext</key> <dict> <key>NSTextContent</key> <string>FilePath&l

Categories : Objective C

Batch: Create a list of folders and then copy multiple files/folders into all of them
Try this: @echo off &setlocal cd /d "RootFolder=X:folder omy data" for /d %%a in (*) do xcopy "_TEMPLATE" "%%~fa" /sihrky For xcopy options see xcopy /?, to test the command without writing add option /l.

Categories : List

How to retrieve the list of selecetd files, from finder, efficiently, in a cocoa app?
You can use apple script tell application "Finder" get selection end tell or osascript -e "tell application "Finder" to return selection"

Categories : Objective C

How to "collapse" a view's height with an animation?
If you want the effect that View B disappears behind view A you need to draw B before A: <RelativeLayout> <ViewB /> <ViewA above="ViewB"/> </RelativeLayout> and then move ViewB around. I have done the same with the following code, that will move viewToMove up by it's own height: public void collapse() { View viewToMove= mainView.findViewById(R.id.viewToMove); int pixelsToMove= viewToMove.getHeight() * -1; slots.animate().yBy(pixelsToMove).setDuration(ANIMATION_DURATION_MS); } Take care when you call getHeight() you might need a ViewTreeObserver to get the correct value, because most times before the view is drawn getHeight() will just return 0

Categories : Android

Kendo tree view, nodes collapse but never expand again
This was a bug in Kendo UI but was solved in version 2013.1.514. Trying using: <link href="http://cdn.kendostatic.com/2013.1.514/styles/kendo.common.min.css" rel="stylesheet"> <link href="http://cdn.kendostatic.com/2013.1.514/styles/kendo.default.min.css" rel="stylesheet"> <script src="http://cdn.kendostatic.com/2013.1.514/js/jquery.min.js"></script> <script src="http://cdn.kendostatic.com/2013.1.514/js/kendo.all.min.js"></script>

Categories : Kendo Ui

Collapse a list of ng-repeat
I had the same problem last week. You need to have the latest scripts. Include these (if not already done): http://ajax.googleapis.com/ajax/libs/angularjs/1.0.5/angular.js http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.4.0.js Also easy to forget, is that you need the ui.bootstrap as parameter... var myApp = angular.module('myApp', ['ui.bootstrap']); Check out the isThingsCollapsed jsfiddle i created... EDIT Since I got a comment that said that my answer is not even answering the collapse of a ng-repeat I try to give you my view of the problem and then some examples: The answer (above "edit") was about how the problem is not in the code you provided us with in the question. Since I had the same problem - the code was correct but not showing a collapse, I finally found

Categories : Angularjs

Collapse part of items in a list
Give each li a data-role="collapsible" and inside its' header, add your custom span which hold tags. Demo <li data-role="collapsible"> <h2>Item 1<span class="tag-list"><span class="tag">tag 1</span></span></h2> <div class="comment"> <p>This is a comment</p> </div> <div class="comment"> <p>Another comment</p> </div> </li>

Categories : Jquery

An Expand/Collapse button in Android (to show/hide an optional view)
Maybe this post will be useful for you. I implemented ExpandablePanel layout in one project and in my case this layout fit good.

Categories : Android

Can I specify a relative “data-target” for collapse accordion in Bootstrap 3 whilst retaining the “collapse others” functionality?
You're running into an issue because in your example you haven't initialized the collapse functionality until you call $(parent_id+' .panel-collapse').collapse('hide'). You can solve this problem by adding the following line on document ready: $('.panel-collapse').collapse({toggle: false}); Here's a working fiddle.

Categories : Javascript

Expand/Collapse List of Items with jQuery
If the structure of the HTML cannot be modified, you're going to have to traverse the DOM... from the click event target (the anchor), up to its container (li) up to ITS container (ul) up to ITS container (div.controls) and then next() to find div.comments. jQuery can make that a pretty easy chain, but it is obviously somewhat fragile. If you CAN modify the structure of the HTML, you have a slew of better options available to you, and can use IDs and data- attributes to avoid the overhead of traversing the DOM.

Categories : Jquery

View Shared Folders on a Mapped Drive
Only the computer hosting the files knows which folders are shared. (Try sharing a folder on that mapped drive.) In order to do this the Correct Way™, you'll have to run the process (net share) on the machine actually serving the directory you have mapped to L:. I believe Windows stores share information in the registry: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetservicesLanmanServerShares If you knew the machine name serving the share you've mapped to L: (we'll call it server-32), then you could do something like REG QUERY \server-32HKLMSYSTEMCurrentControlSetservicesLanmanServerShares This doesn't show you any of the admin shares (IPC$, C$, etc.), but it will show you the items that have been shared by users.

Categories : Dotnet

Why Expand and collapse is not working, After text search in Accordion List?
I have achived. store.filter function, filter the text nicely but if it has child nodes also it wont show. because we have searched some particular text on store. after filter shows only those filter text. I have gone another way. it is working very nicely as per my requirement. I am calling web service store.load(). In store searching for entered text. if entered text is not available at parent level, removing that particular items form store. After iteration, final store assigning to accordion list. accordion list shows related search text data. cheers :). below is code. Thank you. store.getProxy().setUrl('resources/Json/TestsStore.json'); store.load({ scope: this, callback: function(records, operation, success) {

Categories : Javascript

Apply twitter bootstrap collapse plugin on a plain ul list
I presume you already included all needed bootstrap files. Better way to apply bootstrap classes is on menu load (through menu module override). But, you still can make it the other way, like: $('.deeper').addClass('accordion-toggle'); And if you need to add new attribute (for example, data-toggle attribute) to the element: $('.deeper').attr('data-toggle', 'collapse');

Categories : Twitter

How to get list of folders from a website
Generally, you will have to have the server run some code to get the list of directories. The client does not have access to the filesystem of the web server, and even using FTP or WebDAV the scope of what can be seen by the client will be limited.

Categories : C#

How to List all folders (projects) of a Git Repository
I think authentication is the reason behind this. Your code nowhere mentions username and password and while accessing remote git branches you need to provide your credentials. Check if the available resources provide any way of authentication.

Categories : Java

How can i get list of only folders in amazon S3 using python boto
Basically there is no such thing as a folder in S3. Internally everything is stored as a key, and if the key name has a slash character in it, the clients may decide to show it as a folder. With that in mind, you should first get all keys and then use a regex to filter out the paths that include a slash in it. The solution you have right now is already a good start.

Categories : Python

Find parent folders in list of paths
Use set: >>> list_of_folders = [ ... u'Magazines/testfolder1', ... u'Magazines/testfolder1/folder1/folder2/folder3', ... u'Magazines/testfolder1/folder1/', ... u'Magazines/testfolder1/folder1/folder2/', ... u'Magazines/testfolder2', ... u'Magazines/testfolder2/folder1/folder2/folder3', ... u'Magazines/testfolder2/folder1/', ... u'Magazines/testfolder2/folder1/folder2/', ... u'Magazines/testfolder3', ... u'Magazines/testfolder3/folder1/folder2/folder3', ... u'Magazines/testfolder3/folder1/', ... u'Magazines/testfolder3/folder1/folder2/', ... ] >>> result = set() >>> for folder in list_of_folders: ... for parent in result: ... if folder.startswith(parent): ... break ... else: ... r

Categories : Python

how to get list of all folders with their name on google-drive(solved)
First, if you are interacting with user to choose specific file or folder from Drive, use Google Picker. Implementing your own picker is very inefficient and slow. And only with few lines of javascript code, you can do exactly what you want. Second, you are using children.list which doesn't provide enough information for files. You should rather use Files.list() with query mimeType = 'application/vnd.google-apps.folder' and trashed = false and you will get all folder information you want. Third, you forgot to implement pageToken. For some users who have a lot of files/folders, they might hit maxResults and query might not show all files/folders you want. Please take deeper look at sample codes.

Categories : Qt

Unversion and add to ignore list for multiple folders
Have you tried this? Open Windows explorer in a parent directory, above all your bin folders. Enter bin in the search bar After search is complete, control click to select all the bin folders you want to unversion and ignore. Right click on one of the bin folders and choose TortoiseSVN -> Unversion and add to ignore list -> Delete and ignore (X) items by name

Categories : Svn

Create custom UI bar button (to change view from list view, grid view)
It is UISegmentedControl not UIButton UISegmentedControl *segmentedControl = [[UISegmentedControl alloc] init]; [segmentedControl insertSegmentWithImage:[UIImage imageNamed:@"0.png"] atIndex:0 animated:NO]; [segmentedControl insertSegmentWithImage:[UIImage imageNamed:@"1.png"] atIndex:1 animated:NO]; UIBarButtonItem *barButtonItem = [[UIBarButtonItem alloc] initWithCustomView:segmentedControl]; [[[self navigationController] navigationItem] setRightBarButtonItem:barButtonItem];

Categories : IOS

How to acess list of files and folders in a zip file in java?
You need to use the ZipFile class, e.g. like ZipFile zipFile = new ZipFile(strFilePath + ".zip"); Enumeration<? extends ZipEntry> entries = zipFile.entries(); while(entries.hasMoreElements()) { ZipEntry entry = entries.nextElement(); System.err.println(entry.getName()); } See also List Contents Of Zip File Example.

Categories : Java

Php list ONLY files inside zip archive (exclude folders)
Your foreach is useless. It iteratate over array with one item. Anyway there is two way to detect folder. First, folders are ended with '/'. Second folders has 0 size. $za = new ZipArchive(); $za->open('zip.zip'); $result_stats = array(); for ($i = 0; $i < $za->numFiles; $i++) { $stat = $za->statIndex($i); if ($stat['size']) $result_stats[] = $stat; } echo count($result_stats);

Categories : PHP

Create folders in directory from values in list. Python
to make a folder: import os os.mkdir(path[, mode]) if you want to make a directory such as ~/dinosaur/llama/nested/etc/ then you should use os.makedirs(path[, mode]) as it builds all the nested paths needed to make sure that is valid so say you're currently in ~/tmp >>> import os >>> os.mkdir('llama') >>> os.mkdir('me') to make the folders inside that directory. but what if we wanted inside ~/llama/me/ but we're still in ~/tmp~? then you can use mkdir twice, or you can just use >>> import os >>> os.makedirs('/home/llama/me')

Categories : Python

AngularJS collapse directive. Collapse all but self
I ended up using $broadcast from a parent controller. The expanding directive asks the parent controller to broadcast a collapseChange event, which all directives listen for. Parent controller $scope.broadcastCollapseChange = function (id) { $scope.$broadcast('collapseChange', { 'id': id}); }; Directive scope.collapsed = true; var onCollapseChange = function (v) { if (scope.collapsed == false) scope.$parent.broadcastCollapseChange(scope.$id); } scope.$watch('collapsed', onCollapseChange); scope.$on('collapseChange', function (event, args) { if (scope.collapsed == false && args.id != scope.$id) scope.collapsed = true; });

Categories : Angularjs

Create the same multiple folder in all sub directory folders from excel list using VBA
Use an array for the subfolders and loop through that for each of your 1st level folders. Change this line vSubfolders = Array("A", "B", "C") to add/remove your second level folders Sub MakeFolders() Dim xdir As String Dim fso As Object Dim lstrow As Long Dim i As Long Dim vSubfolders Dim vSubFolder vSubfolders = Array("A", "B", "C") Set fso = CreateObject("Scripting.FileSystemObject") lstrow = ActiveSheet.Cells(ActiveSheet.Rows.Count, "A").End(xlUp).Row Application.ScreenUpdating = False For i = 1 To lstrow xdir = "C:UsersNikkiSharedVIC" & Range("A" & i).Value If Not fso.FolderExists(xdir) Then fso.CreateFolder (xdir) End If For Each vSubFolder In vSubfolders If Not fso.FolderExists(xdir & "" & vSubFolder) Then fso.CreateFolder (xdir & "" & vSubFolder) End If Ne

Categories : Excel

How to stop threads of following type in Java used for watching folders for files using WatchService for folders by using jToggleButton
There is a Thread.stop() method, but is has been deprecated, because it's unsafe. Instead of using the deprecated method(s), you can modify some variable to indicate that the target thread should stop running.

Categories : Java

JQuery File Upload and Carrierwave to Detect Folders and Sub Folders
I don't think this is possible. See here: http://www.codeproject.com/Questions/573788/HoeplustoplusGetplustheplusOriginalplusfilepluspat It appears that you can't know the context of the uploaded file on the source operating system. Therefore you can't create it's original parent folder structure on your system.

Categories : Jquery

MATLAB: Opening and Editing Files nested in folders in folders
Check out subdir! On the file exchange, its an awesome function that can return all folders and all files in expansive subfolders, and you can filter file names by extension and whatnot. http://www.mathworks.com/matlabcentral/fileexchange/15859-subdir-a-recursive-file-search

Categories : Matlab

Batch file creating folders in all folders of current directory
Total rewrite of answer. This will make a "Outlook Archive" folder in only the DataMy Documents subfolders of wherever the batch file resides. for /f "delims=" %%i in ('dir /ad/s/b') do if EXIST "%%iDataMy Documents" MKDIR "%%iDataMy DocumentsOutlook Archive" pause Credit to here

Categories : Windows

How can i get a list of files(only sound related .flac, .m4b, .mp3) and folders with them from a directory on the sd card?
static Uri[] mUris; static String[] mFiles = null; public static String[] getMusic(){ File music = Environment.getExternalStorageDirectory(); // File asd = Environment. // String[] savedFiles = getApplicationContext().fileList(); File[] musicList = music.listFiles(new FilenameFilter() { @Override public boolean accept(File dir, String name) { // TODO Auto-generated method stub return ((name.endsWith(".mp3")||(name.endsWith(".m4b")||(name.endsWith(".flac")))); } }); mFiles = new String[musicList.length]; for(int i=0; i<musicList.length;i++) { mFiles[i]=musicList[i].getAbsolutePath(); } return mFiles;

Categories : Android

how to get a particular column value from a list view on click of a row from that list view?
Try out like this: listView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) { // TODO Auto-generated method stub Cursor cursor = listView.getItemAtPosition(position); // Here you have to getString using index String str = cursor.getString(<you column index>); Toast.makeText(PendingActivity.this, str, Toast.LENGTH_LONG).show(); } });

Categories : Android

Delete all folders except 2 lastest folders in Windows
for /f "skip=2 delims=" %G in ('dir /B /ad-h /o-d') DO echo going to delete %G For /f to process lines of "output" from single-quoted DIR... Delims= is better. tokens=* will work here, but suppresses leading spaces. /b to suppress header output from dir /o-d for REVERSE-date order. You want to KEEP the two skipped dirs, which occur FIRS in a reverse-date sort. ...good echo safety measure.

Categories : Windows

How to get `scroll at bottom` and `scroll at top` of a list view of a Sencha Touch list view?
I do not use Architect, but what you need is get a ref of your list in controller, and attach an handler for the scroll event of the scroller object in the initialize event of the list: Controller config: { refs: { list: '...', ... }, control: { list: { initialize: 'onListInit' }, ... }, ... }, onListInit: function() { var scroller = this.getScrollable().getScroller(); scroller.on('scrollstart', this.onNnListScrollStart, this); scroller.on('scrollend', this.onNnListScrollEnd, this); }, onNnListScrollStart: function(scroller, x, y) { console.log('START SCROLL'); }, onNnListScrollEnd: function(scroller, x, y) { console.log('scroll x:'+x); console.log('scroll y:'+y); var bottom = scroll

Categories : Extjs

Add a service in Mac Finder using CLI
To go with my comment here is a very basic example. Which is to show you how services are registered, even the Automator ones. And why I think you may not be able to do what you want. Using Xcode I have created a new project. Code in the .m file: // // AppDelegate.m // testServiceExample // // Created by Mark Hunte on 02/09/2013. // Copyright (c) 2013 Mark Hunte. All rights reserved. // #import "AppDelegate.h" @implementation AppDelegate - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { [NSApp setServicesProvider:self];//Registers a given object as the service provider. NSUpdateDynamicServices();//Causes the services information for the system to be updated. } -(void) runAService:(NSPasteboard *)pboard userData:(NSString *)userData error:(NS

Categories : Osx

customized list view with text view and button not support for multiple screen?
i m giving u a demo.this layout will work on all size layout,this will definitely help u @Yugesh. weight works percentage-wise on all screen. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_vertical" > <RelativeLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight=".30" android:gravity="center_horizontal" > <ImageView android:id="@+id/image1"

Categories : Android

jquery plugin to toggle list view and column view for bootstrap
In the example you provide (switching between grid / list view) the wrapping seems kind of complex. I think you could switch between grid and list view by making the grid view default (using Bootstrap's grid classes). Switch to the list view by adding a list-group-item class and undo the grid styles for width and floating. See: http://bootply.com/78753 css: .item.list-group-item { /*reset the grid float and width and add a background for fun */ float: none; width: 100%; background-color:green; } /* give the image a left float in the list view */ .item.list-group-item img{float:left;} /* and clearfix the left float of the image */ .item.list-group-item:before, .item.list-group-item:after { display: table; content: " "; } .item.list-group-item:after { clear:both; }

Categories : Jquery

How can I display a container and list in a Sencha Touch 2.2 view and have the whole view scrollable?
You have to set a specific list height in order to let it show. If you doesn't know the final height of the list, try to get it: attach this handler to your list: listeners: { painted: function() { this.setHeight(this.itemsCount*this.getItemHeight()); } }

Categories : Javascript

i have videos list when i select row video will play on another view how to stop and come back for table view
MPMoviePlayerController *myPlayer declare global and init . and [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(doneButtonClick:) name:MPMoviePlayerWillExitFullscreenNotification object:nil]; And selector method: -(void)doneButtonClick:(NSNotification*)aNotification{ [myPlayer stop]; }

Categories : Iphone

Backbone - How to render singular model view from existing List View without fetching again & retaining history
You say you want to have something happen when you click the view. For this, Backbone has the events object on it's View: App.ArtifactView = Backbone.View.extend({ events: { 'click': 'openDetailsView' }, openDetailsView: function() { // Here you put the code to open the the code // that should open the code that opens the // window that shows details about only this // particular articaft. } }) In the view you can access it's model with this.model (if it has a model) and then you can use that to get the attributes for that model to display it in the output. Does that help you along?

Categories : Javascript

List View not displaying divider for 1st item with Text View on top
That is not what android:headerDividersEnabled is supposed to do. It means that if you are adding a list header whether that header needs to be separated by a divider or not. Here is a working example: stackoverflow.com/a/8819402/915756 hope this helps

Categories : Android



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.