w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Strange behaviour of Umbraco media folder
There are no issues I know of with Umbraco 4.7.x deleting its own media. It is possible to do it remotely, but that would delete the nodes as well as the physical files. The only cause is the one which seems most unlikely, and that is someone has accidentally deleted them. I find this occasionally happens when deploys are done. Someone replaces the media folder with the one from the staging environment. I have also seen an issue if files are copied across an RDP connection, the files being copied are not copied completely and in the process some actually disappear from the target folder. But either way, I would check your internal processes, maybe move the media folder to a virtual directory to avoid the chances of it being overwritten.

Categories : Asp Net

Editing Media Properties programmatically in Umbraco (4.11)
you should be able to exactly what you've already done but replace the line: Document doc = new Document(mediaItemId); with Media doc = new Media(mediaItemId); You will of course have to make sure that your Media type has a "likes" property. This can be done in the "Settings > Media types" section of Umbraco in the same way that you can add properties to document types.

Categories : C#

Youtube API - API search results differ from web search results, and no partial matches?
In the web you are searching the entire channel (not only the uploads playlist but all the playlists inside the channel) vs in the second one you restrict the search with uploads playlist. I also strongly suggest to use Data API v3 instead of GData

Categories : Android

Umbraco Lucene search for auto complete
You probably need to start much simpler than this. You need to build the following queries as the user types into the field: nodeName:d* nodeName:de* nodeName:des* nodeName:desi* and so on. If you want to search over more than one field, build the following queries: nodeName:d* bodyText:d* nodeName:de* bodyText:de* nodeName:des* bodyText:des* nodeName:desi* bodyText:desi* This will perform an OR search, search both as optional fields. Adding a + to the front of nodeName will make that matching nodeName mandatory but bodyText optional, e.g: +nodeName:d* bodyText:d* If the user specifies more than one term, use regex to sanitize the input (remove all the non letter number characters), split string based upon spaces and build the following:

Categories : C#

Umbraco & TFS - Including hidden files
I came across this article which explains how to 'blanket' include files or folders in a .csproj file. In a nutshell you can add the following references: <Content Include="PathToFolder**" /> <Content Include="PathToFolder*.*" /> <Content Include="PathToFolder*.jpg" > So in the case of Umbraco you will first need to exclude the following folders from the project: /umbraco /umbraco_client /media /masterpages /views /macroscripts /xslt then open up the .csproj file in a test editor and add: <Content Include="umbraco**" /> <Content Include="umbraco_client**" /> <Content Include="media**" /> <Content Include="masterpages**" /> <Content Include="views**" /> <Content Include="macroscripts**" /> <Content Include="xslt**" /> S

Categories : Visual Studio 2012

In Umbraco 6.1.1 MVC 4, how can I do a form post back to a surface controller using a model that inherits from Umbraco's RenderModel?
Ok, I've had no responses to this question but am now in a position to answer it myself. Maybe it was a fundamental oversight, but not that obvious imho, and information on the Umbraco forum etc about inheriting from RenderModel is fairly limited. Essentially the answer, as was my first instinct, is to solve the original exception "No parameterless constructor defined for this object" by providing a paramaterless constructor. The difficulty is working out what to put inside the parameterless constructor for my model, since it inherits from the Umbraco RenderModel which requires an IPublishedContent instance passed to it's constructor. Luckily while browsing around I happened across this post on the Umbraco forum: http://our.umbraco.org/forum/developers/api-questions/40754-Getting-Curre

Categories : Asp Net Mvc

How to use instagram search/media api search photos one month ago
You have the idea right, use max_timestamp to make API call, may be the location you are searching does not have photos a month ago or I have noticed that you could only go back a few days back when searching using this API. I have a implementation of this on gramfeed, you can search photos at a location and select a date you want to go back to.

Categories : Api

Umbraco MVC Implementation - View does not depend on Umbraco implementations
No you can't. Simply because all requests pass through a single action. In order to retrieve a path to a CMS-managed page, you need to use the node/content traversal the @Model provides. See here for more details on this. Edit To clarify, the author of the article is suggesting that the Umbraco implementation should be more in line with a traditional MVC implementation with little or no logic in the views. Therefore, any querying of node data should happen prior to the view (e.g. in the Mappers). So this is where you would have to retrieve the links. Umbraco's default MVC implementation forces all requests to go via a single action on a single controller. The author's implementation allows the requests to be shared across one controller per document type - which is better IMO. But it st

Categories : Asp Net Mvc

Umbraco Template/Master Files Reappearing after Deletion in VS2010
i found the best way to use VS 2010 with umbraco is to install this extension http://our.umbraco.org/projects/developer-tools/visual-studio-2010-project-template which allows you to create the umbraco site as a VS project. This ensures any change you do to umbraco are picked up in visual studio as well and the best way to delete/create templates is to do it via umbraco as it creates references and and id to these in the database (if you do it in vs the umbraco settings that do this wont pick it up).

Categories : Visual Studio 2010

Umbraco MediaService / Umbraco MediaItem not saving
To Save media, I found this method with MediaService. However, I think it's possible another method more refined [HttpPost] public JsonResult Upload(HttpPostedFileBase file) { IMedia mimage; // Create the media item mimage = _mediaService.CreateMedia(file.FileName, <parentId>, Constants.Conventions.MediaTypes.Image); mimage.SetValue(Constants.Conventions.Media.File, file); _mediaService.Save(mimage); return Json(new { success = true}); }

Categories : C#

Umbraco - error when using umbraco.library:NiceUrl(...)
Ok I found a solution: I added an extra check to this part: <!-- Return the url --> <xsl:if test="$i = $max"> <xsl:if test="$id != '' "> <xsl:value-of select="umbraco.library:NiceUrl($id)" /> </xsl:if> </xsl:if> this fixed my problem.

Categories : Xslt

SQL Code in home rolled gridview search results not displaying correct results
Have you tried wrapping all the OR statements in your query in () It almost looks as if it's reading it as: (record_number >= 500 AND ([column_a] LIKE '%' + @column_a + '%')) OR ([column_e] LIKE '%' + @column_e + '%') OR ([column_g] LIKE '%' + @column_g + '%') OR ([column_h] LIKE '%' + @column_h + '%') OR ([column_j] LIKE '%' + @column_j + '%') rather than: record_number >= 500 AND (([column_a] LIKE '%' + @column_a + '%') OR ([column_e] LIKE '%' + @column_e + '%') OR ([column_g] LIKE '%' + @column_g + '%') OR ([column_h] LIKE '%' + @column_h + '%') OR ([column_j] LIKE '%' + @column_j + '%')) the difference being that it sees the >= 500 plus the first statement for column_a as one condition in which case the other conditions can be true as well resulting in results that are re

Categories : C#

apache solr - show possibly related search results if no results found
You have to handle it on the Client side to fire a Second Query in case of No results found in Solr. You can use the Spell Check components/Did You mean based on the Index dictionary to provide suitable suggestions to the User instead of firing a default search.

Categories : Apache

Could not locate Razor Host Factory type: umbraco.MacroEngines.RazorUmbracoFactory, umbraco.MacroEngines
If you are trying to host the blogengine site within a virtual directory of the Umbraco site, then you will have to amend the blogengine web.config to "remove" all the Umbraco-specific handlers and modules, as these will be inherited by the blogengine application, causing this exception because the application can't find the relevant DLLs in its bin folder. I recently had a similar problem and I have posted the web.config I used in the virtual directory below. Mine was a very simple web application, so obviously this will not work by itself in your blogengine app. You will need to add the relevant parts into your web.config file. Also, this was for a v6 Umbraco install in IIS7.5, so you may have to experiment a little. <?xml version="1.0"?> <configuration> <configSecti

Categories : Iis

Getting twitter api to return search results instead of results summary
In twitter API's documentation when you use "search", you got this dict object and in statuses key you should have a list of tweets according to your search options. Be sure that tweets in statuses are dict objects too, and its content are in text key

Categories : Python

Clicking on search button to search through sqlite database according to user input and display results in listview
You need to add function to get details from DB based on the user input. (eg:) if you want to get the list of users with a name starting with the letter "J", SELECT * FROM YOUR_TABLE WHERE FirstName LIKE 'J%';

Categories : Android

Include singular search results when search for plural in Solr
You need to apply stemming to your indexed fields in order to achieve this behavior. Please see the Stemming Wiki Page for a complete explanation and an example fieldType to support stemming.

Categories : Solr

MySQL: Use search results (Like %search%), to match id's in another table in the database
I would perhaps try a combination of LOCATE() and SUBSTR(). I work mainly in MSSQL which has CHARINDEX() that I think works like MySQL's LOCATE(). It is bound to be messy. Are there a variable number of elements in the parts-list field?

Categories : PHP

google json api search results limit, not 100 search queries per day
another year passed... Limits are the same =(( Google forces us to use multiple accounts to get complete search results. Use a query per day/week/month. Or you can sort huge result array by publish date. And when '100-items' limit is reached you should execute new request with excluding first items by applying "the lowest(or the highest) possible value" condition on publish date. btw, using webbrowser you could set 100 results per page. So total count of result items is 1000 per query. Web crawling would be helpful=)))) be happy!

Categories : Json

search form that redirects to search results page, rails
You can do it like this: <%= form_tag "http://www.stackoverflow.com/questions", :method => 'get',:id => "products_search" do %> Put whatever you need in place of that URL. for more info please look at the form_tag helper documentation But if you need actually to be trough that path you were using, you have to use a redirect or a forwarding. For using a forwarding just call the name of the next action near the end of that action yuo are calling. Something like: def another_action ... end def product ... another_action end For using a redirect just do it like: def products redirect_to another_action end

Categories : Ruby On Rails

Trouble in search in grocery CRUD, search by one field with no results
I think your problem is the code: $crud->where('parentid', $parent_id); Did you include the $parent_id to the URL? So for example if you have http://www.example.com/main/test it has to be: http://www.example.com/main/test/345 or something like that. So in your case I think this will solve your problem: if (!empty($parent_id)) { $crud->where('parentid', $parent_id); }

Categories : Misc

Optimizing Search: no results returned for phrase search
What about this kind of thing : $query = "SELECT * FROM files WHERE ('".$searchText."' LIKE concat('%',keywords,'%')) OR (keywords LIKE '%".$searchText."%') ORDER BY website, description ASC";

Categories : PHP

tipue search not displaying search results
Well, to begin with, you're missing a comma (which I believe is required) next to 'mode': 'live': $(document).ready(function() { $('#tipue_search_input').tipuesearch({ 'mode': 'live', 'liveDescription': '.header', 'liveContent': '.container' }); }); This should've produced an Expected token '}' error in your console.

Categories : Javascript

Search Results from an array by search the keyword in php
You could use array_filter() to filter the array: $output = array_filter($yourArray, function($v) { return stristr($v, 'fu'); }); Would output: array 4622 => string 'Function Areas' (length=14)

Categories : PHP

changing results from a search to a premade search (php)
Having had a look at the docs, I'm pretty sure you'd do this: $twitter = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET); // API v1 $twitter->host = "http://search.twitter.com/"; $search = $twitter->get('search', array('q' => 'from:eurogamer OR from:nintendolife OR from:outsidebox', 'rpp' => 4)); /* // API v1.1 (I think) $twitter->host = "https://api.twitter.com/1.1/"; $search = $twitter->get('search/tweets', array('q' => 'from:eurogamer OR from:nintendolife OR from:outsidebox', 'count' => 4) ); */ $twitter->host = "https://api.twitter.com/1.1/"; foreach($search->results as $tweet) { $status = 'RT @'.$tweet->from_user.' '.$tweet->text;

Categories : PHP

how to search for folder name under media - or create one - django
def custom_path(instance, filename): path = os.path.join('upload', 'media', slugify(instance.student.user.username)) try: os.path.mkdir(path) except OSError: # path already exists pass Using slugify here in case the username contains some special characters that are not allowed as file name. os.path.mkdir will raise OSError if the directory already exists. Finally, os.path.join to correctly create a path and you don't need the filename component, since you are returning a directory path.

Categories : Python

is there a search results github code that makes calls to web services (index/js) and returns results based on code words?
try this for authentication examples :https://github.com/apache/cordova-android/blob/master/framework/src/org/apache/cordova/CordovaWebViewClient.java

Categories : Android

Extending Orchard's search/indexing module to search in uploaded Word, Excel, Powerpoint and PDF files
It's not available out of the box, but possible to implement on your own, especially with upcoming Orchard 1.7 which will make uploaded Media files content items. There are a few extension points for this, with OnIndexing<T> content handler method being the easiest and most straightforward to use. This is the place where extracting keywords and adding them to index should happen. Look at existing implementations for examples. Speaking of keyword extraction - I used iTextSharp for PDFs and MS OpenXML SDK 2.0 for handling Office documents (although it will work only for the new formats - DOCX, PPTX and XLSX). For legacy, non-XML Office formats you'd need some other library - there are lots of those on the web.

Categories : Pdf

Narrow down search from search results
Try something like this: DECLARE @SQL NVARCHAR(500) DECLARE @SubjectCommand VARCHAR(50) SET @SubjectCommand = '' IF (SubjectIsSelected) BEGIN SET @SubjectCommand = 'AND (Subject_1 = ''Maths'' OR Subject_2 = ''Maths'' OR Subject_3 = ''Maths'')' END SET @SQL = 'SELECT First_Name, Last_Name, City, Subject_1, Subject_2, Subject_3, Standard_From, Standard_To FROM TutorProfile WHERE City = ''Mumbai''' +@SubjectCommand EXEC(@SQL)

Categories : Asp Net Mvc

Use of media files with GIT on Bitbucket?
A git repository grows very rapidly if you commit many binary files and change them often. However, you need a backup for your media files anyway, right? Put the in the same repository. Why use another way when you have a perfect version control solution already? The only reason not to do so is not about software development at all. It is about price of disk space. If the price for large repository does not bother you - just go for it and you will be happy.

Categories : GIT

XNA MediaLibrary not being populated with media files
XNA simply doesn't work like that: It expects all content to be directly included in the XNA Content Folder (and accessed via Content.Load<..>(..);)*. Might I recommend you read some related XNA Tutorials on the subject before you continue asking questions? . *There are ways around this, but they are much more advanced, and I don't get the impression from your post that you're ready for things like that.

Categories : C#

django media files on develop
urlpatterns = patterns('', # Uncomment the admin/doc line below to enable admin documentation: # url(r'^admin/doc/', # include('django.contrib.admindocs.urls')), .... ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)urlpatterns += staticfiles_urlpatterns() this is how i serve my media

Categories : Django

How can I use django-storages for both media and static files?
Yes this is possible by configuring both DEFAULT_FILE_STORAGE and STATICFILES_STORAGE to use the S3 storage. However if you set DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' STATICFILES_STORAGE = 'storages.backends.s3boto.S3BotoStorage' then these will both use the default settings for the S3 storage, meaning they will both use the AWS_STORAGE_BUCKET_NAME bucket. The way to work around this is to create a small subclass of S3BotoStorage in your project which uses a different setting for the bucket name. from django.conf import settings from storages.backends.s3boto import S3BotoStorage class S3StaticStorage(S3BotoStorage): def __init__(self, *args, **kwargs): kwargs['bucket'] = settings.AWS_STATIC_BUCKET_NAME super(S3StaticStorage, self).__init

Categories : Python

How to list all media files in windows phone 7?
Use the MediaLibrary class. Here's an example of how to retrieve all the songs in the media library and play the first one. http://msdn.microsoft.com/en-us/library/windowsphone/develop/microsoft.xna.framework.media.medialibrary.aspx

Categories : C#

How to set music files which are not in Media Store as ringtone
I have try with something and its work for me. Hope it will also help you. I am fetching all the available songs in device with below method: public static long [] getAllSongs(Context context) { //System.out.println("In get All Songs Method"); Cursor c = query(context, MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, new String[] {MediaStore.Audio.Media._ID}, MediaStore.Audio.Media.IS_MUSIC +"!= 0", null, MediaStore.Audio.Media.TITLE + " ASC"); try { if (c == null || c.getCount() == 0) { return null; } int len = c.getCount(); long [] list = new long[len]; for (int i = 0; i < len; i++) { c.moveToNext(); list[i] = c.getLong(0); //System.out.println("ID IS: "+c.getLong(

Categories : Android

Add (media) files to a file of custom format in C++
Try using any of the BSD-Licensed (NiH's libzip, for example) zip libraries, fast and easy containers for your program, integrity-checked and optionally encrypted. Anoter option: SDL allows loading from memory and other custom resources using the SDL_*RWops functions, check http://www.kekkai.org/roger/sdl/rwops/rwops.html. It wouldn't be hard to read files from an uncompressed container (zip, tar, romfs) using RWops.

Categories : C++

django heroku media files 404 error
My guess would be that something is off with your static files. For example, you have STATIC_ROOT = os.path.join(BASE_DIR, 'static/') For my Heroku app, I have STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), ) Settings for static files is something that few people seem to really understand (including myself), but this blog post offers a pretty good explanation: http://blog.doismellburning.co.uk/2012/06/25/django-and-static-files/

Categories : Django

Correct path/url for media files in django
User-uploaded files (by admins or site users) go to media directory. Static files are files provided by developers (or from third-party apps). Set something like this: # Local disk paths MEDIA_ROOT = '/Users/username/Projects/django_books/media/' STATIC_ROOT = '/Users/username/Projects/django_books/static/' # URLs visible in the browser's address bar MEDIA_URL = '/media/' STATIC_URL = '/static/' And in Your template use the STATIC_URL variable: <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/beers.css" /> And move your styles to the django_books/static/ directory.

Categories : Python

How to get the media player to play audio files from the app
It will solve your one of the issue:('can't stop the audio and when exiting the app (home key or back key) the audio keeps playing') This part has to be in EVERY activity's onPause: Context context = getApplicationContext(); ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); List<RunningTaskInfo> taskInfo = am.getRunningTasks(1); if (!taskInfo.isEmpty()) { ComponentName topActivity = taskInfo.get(0).topActivity; if (!topActivity.getPackageName().equals(context.getPackageName())) { player.stop(); Toast.makeText(xYourClassNamex.this, "YOU LEFT YOUR APP", Toast.LENGTH_SHORT).show(); } } So you can stop your player when you are exit from app.

Categories : Android

django - can't see the uploaded media files from apache
The images were not loading when uploaded directly from the apache server because of the {% load_thumbnai %} in the index.html file. Here's the snippet of html file: {% load static from staticfiles %} {% load thumbnail %} <!DOCTYPE html> <html> <head> <title>leo</title> <link rel="stylesheet" type="text/css" href="{% static "css/style.css" %}"> </head> .... .... And here's the other part of it for image: {% for Status in status %} <p class="user">{{ Status.creator.get_full_name }}</p> {% if Status.image %} <div class="image_image"> <center>

Categories : Django



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