Daily Archives

Articles indexed Tuesday December 28 2010

Page 5/34 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • macbook pro 13"

    - by LINUX
    Hej Bytte nyligen HD 250GB till 640GB 7200rpm nu har jag bara ca.5 tim battery tid ... och HD snurrar hela tiden. hur kan jag sova ner Hd efter t.ex. 5 minuter ? Tack på förhand. English Translation: I recently switched from a 250GB to 640GB 7200rpm hard drive. Now I only have a 5hr battery life and the hard drive is spinning constantly. How can I spin down the hard drive for, for example, 5 minutes? Thanks in advance.

    Read the article

  • Unable to run cvlc in a script

    - by VxJasonxV
    I'm creating a script that issues a few curl commands in order to access a time-protected mms stream link, then set up a relay using cvlc (vlc's command line interface) for my own use on an unencumbered player. The curl aspect of this is working, as I can run as a browser and curl side by side and get the same access url. (It's time locked meaning the stream will work forever, but you have to connect quickly or the URL will time out.) The very end of the script prints the command I will run, which is then followed up by "exec $CMD". When I echo $CMD I get: cvlc --sout '#standard{access=http,mux=asf,dst=0.0.0.0:58194}' mms://[...] But the cvlc execution output says: [0x9743d0] main interface error: no suitable interface module [0x962120] main libvlc error: interface "globalhotkeys,none" initialization failed [0x9743d0] dummy interface: using the dummy interface module... [0xb16e30] stream_out_standard stream out error: no mux specified or found by extension [0xb16ad0] main stream output error: stream chain failed for `standard{mux="",access="",dst="'#standard{access=http,mux=asf,dst=0.0.0.0:58194}'"}' [0xb11cd0] main input error: cannot start stream output instance, aborting [0xb11f70] signals interface error: Caught Interrupt signal, exiting... Why is it ignoring my --sout input?

    Read the article

  • How to (re)enable the "New" context menu items for an administrator when right-clicking in a folder and selecting New > X?

    - by Metro Smurf
    I just migrated from XP x86 to Win7 x64 (clean install). I had a couple of data drives in my XP x86 system that I physically moved to my Win7 x64 system. When browsing a directory in any of the transferred drives, the only option available in the 'new' context menu is "Folder", i.e., Right-Click inside a folder New Folder (this is similar behavior for Win7 when using the context menu in c:\Program Files): However, whenever creating a new folder within any of the directories, all the context menu new items are available within the new folder: Steps I've taken that have failed to add the new context menu items: Removing all security permissions from a directory and sub-directories. Replacing them with new permissions. As well as removing inheritable permissions from the parent. Taking explicit ownership of a directory and sub-directories. Combing the above two. Sample of Effective Permissions that do not work: Steps I've taken that have succeeded to add the new context menu items: Adding the "Everyone" group to the drive and giving the group explicit "Modify" privileges. Giving the "Everyone" group explicit privileges smells wrong. I'm an administrator on my system; why should I have to add the "Everyone" group as well? Adding my username to the drive and giving full permissions. Again, since I'm an administrator on my system and the administrators group already has full control of the drive/directories/folders, why should I have to explicitly add my user name to the security permissions? Finally, The Question: Is it possible to have the New Item context menu have all available options by default without having to explicitly add the everyone group or a specific user name to the security permissions? I'm suspecting that the option may not be available unless the username is explicitly added to the security permissions. Of note: I've seen the registry hacks for updating the new items context menu; my preference is to avoid such hacks and return the functionality to the expected behavior an administrator should have.

    Read the article

  • Sites To Download Free eBooks For Kindle

    - by Gopinath
    Amazon Kindle is the top selling gadget of this holiday season and many of you would have received it as a gift. For those who got a Amazon Kindle here are few websites that offer free eBooks to fulfil reading appetite at no cost. 1. Free Kindle Books – Amazon Website – This page on Amazon lists nice collection of free books available for Kindle that includes Serial by Jack Kiborn, The Wild’s Call by Jeri Smith, Star Wars by John Jackson MIller and several other books from a list of 40 books. 2. Project Gutenberg: This site as 33,000 + free books that not work let you read on Kindle but also on iPad, PCs and smart phones.  This site is very popular for free ebooks. 3. Google E-Bookstore: Google’s eBookStore has thousands of free ebooks for Kindle in their free books section. 4. Internet Archive: Here you find millions of rare print works that are especially useful for academic research. Multiple language books are also available for Kindle. 5. Open Library: This site is sort of Wikipedia for eBooks with over 20 million user-contributed books and magazines. They are all Kindle friendly. 6. ManyBooks.net: Nearly 30,000 titles, many of which have been pulled from Project Gutenberg. Has a good collection of little-known Creative Commons works. 7. Freebooks.com – the public domain section of this site contains many free ebooks that are perfect for your Kindle. 8. freecomputerbooks.com, freetechbooks.com and onlinecomputerbooks.com - if you are geek and looking for technology books, this is the site you should visit to grab free books. Image credit: bike/flickr This article titled,Sites To Download Free eBooks For Kindle, was originally published at Tech Dreams. Grab our rss feed or fan us on Facebook to get updates from us.

    Read the article

  • Is it me, or is it you? Does the sync work?

    - by bisi
    I have been on this for several hours now, trying to get a simple second folder to sync with my (paid) account. I cannot tell you how many times I removed all devices, removed stored passwords, killed all processes of u1, logged out and back in online...and still, the tick in the file browser (Synchronize this folder) is loading and loading and loading. Also, I have logged out, rebooted countless times. And this is after me somehow managing to get the u1 preferences to finally "connect" again. I have also checked the status of your services, and none are close to what I am experiencing. And I have checked the suggested related questions above! So please, just confirm whether it is a problem on my side, or a problem on your side.

    Read the article

  • Cyclic Dependencies.

    - by PhilCK
    Are cyclic dependencies a common thing in games dev? I ask as I keep getting into situation where I'm using and have been told more than once that they should be avoided. I am wondering if this is just a what people say as a general rule of thumb in the software development business. and that the nature of game programming produces such dependencies. // Foo #include <Bar.hpp> class Foo { bar& m_bar; }; and // Bar class Foo; class Bar { Foo* m_foo; }; I do this alot in Ruby, but dynamic languages are more forgiving in this instance, where as static ones, not so much.

    Read the article

  • How can I delete a specific element in priority queue?

    - by Yuan
    import java.util.*; public class test4 { public static void main(String[] args){ PriorityQueue[] P = new PriorityQueue[10]; P[1] = new PriorityQueue<ClassEntry>(); P[1].add(new ClassEntry(1.2,1)); P[1].add(new ClassEntry(1.5,2)); P[1].add(new ClassEntry(1.2,3)); P[1].add(new ClassEntry(10,4)); P[1].remove(new ClassEntry(10,4));//I can't delete this object??? System.out.println(P[1].size()); ClassEntry ce = (ClassEntry) P[1].peek(); System.out.println(P[1].size()); System.out.println(ce.sim+"\t"+ce.index); } } Why i can't delete (10,4)? Can somebody teach how to implement...thanks!

    Read the article

  • Arduino wireless options

    - by user541597
    I am currently working on a wireless solution for my arduino and computer. I am trying to connect a Transmitter to my computer and a receiver to my arduino. I have seen a lot of examples with arduino to arduino communication but none for computer to arduino. What would I need to interface the transmitter with my computer, PIC? If anyone can provide any insight or any links it would be greatly appreciated. Thanks,

    Read the article

  • Why calling ISet<dynamic>.Contains() compiles, but throws an exception at runtime?

    - by Andrey Breslav
    Please, help me to explain the following behavior: dynamic d = 1; ISet<dynamic> s = new HashSet<dynamic>(); s.Contains(d); The code compiles with no errors/warnings, but at the last line I get the following exception: Unhandled Exception: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'System.Collections.Generic.ISet<object>' does not contain a definition for 'Contains' at CallSite.Target(Closure , CallSite , ISet`1 , Object ) at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1) at FormulaToSimulation.Program.Main(String[] args) in As far as I can tell, this is related to dynamic overload resolution, but the strange things are (1) If the type of s is HashSet<dynamic>, no exception occurs. (2) If I use a non-generic interface with a method accepting a dynamic argument, no exception occurs. Thus, it looks like this problem is related particularly with generic interfaces, but I could not find out what exactly causes the problem. Is it a bug in the compiler/typesystem, or legitimate behavior?

    Read the article

  • PHP: form input field names containing square brackets like field[index]

    - by gidireich
    Hi, I've seen lot of code that handle forms, which creates input fields with names containing square brackets. I understand that this is being somehow converted to PHP arrays when a PHP script examines the $_POST variable. My questions about this: What is the mechanism behind? At which point this names that merely contain brackets are converted to arrays? Is this a feature of the HTPP protocol? Of web servers? Of the PHP language? Continuing the previous question, is this a commonly used hack or a normal programming tool? What are (all) the rules of using brackets in input field names? Can multidimensional arrays be created this way? Thanks, Gidi

    Read the article

  • Android FileOutputStream

    - by zaid
    i am attempting to save an image file using "openFileOutput" and then adding that file to my intent with EXTRA_STREAM. but logcat keeps saying that file size is 0, i have the proper permission in my manifest. FileOutputStream fos = openFileOutput("p001.jpg", Context.MODE_WORLD_READABLE); File jpg = getFileStreamPath("p001.jpg"); fos.close(); Intent share = new Intent(android.content.Intent.ACTION_SEND); share.setType("image/jpeg"); share.putExtra(Intent.EXTRA_SUBJECT, "Fail picture"); share.putExtra(Intent.EXTRA_TEXT, "Epic fail!!!"); share.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(jpg)); startActivity(Intent.createChooser(share, "Choose share method."));

    Read the article

  • Xcode - duplicate Target - new Target fails to build

    - by SirRatty
    Hi all, using Xcode 3.2.5 on 10.6.6 (10J521) I have an Xcode project containing 1 Target: "MyApp". It builds and runs successfully. As well as source and resource files, the Target contains a "Copy Files" build phase which copies "Sparkle.framework" in. The framework is in the same directory as the project. I want to duplicate this Target. Steps taken: Did "Clean all Targets". Right-clicked on the "MyApp" Target within Xcode, and then chose "Duplicate". Renamed the duplicated target to "MyAppTarget2". Selected "MyAppTarget2" as the Active Target from the popup menu in the top-left. Did "Build". The problem: error: Sparkle/Sparkle.h: No such file or directory This is puzzling! Each Build step appears to have been replicated in the duplicated Target, including the "Copy Files" phase. The Sparkle.framework exists at the path indicated by [Get Info on the Copy Phase item]. If I right-click on the Sparkle.framework file within the "Copy Files" build phase of the duplicated Target, and select "Reveal in Finder", then the correct Sparkle.framework file is shown. The required file exists at Sparkle.framework/Headers/Sparkle.h If I switch back to the original "MyApp" target, it builds and runs successfully. Am I doing something obviously wrong here? Thanks.

    Read the article

  • Conditional value for ActiveRecord create method only

    - by Steve Wright
    I have a form where I have an administrator creating new users. The form uses the User model I created (login, password, first_name, etc...). For the last field on the form, I want to have a checkbox that doesn't need to be stored as part of the User record, but it is needed for the controller. This will control whether or not the newly created user will receive a welcome email or not. def create @user = User.new(params[:user]) if @user.save if @user.send_welcome_email UserMailer.welcome_email(@user).deliver end redirect_to(admin_users_url, :notice => "User #{@user.name} was successfully created.") else render :action => "new" end end In my view (haml) I am trying to access it like this: %p Send Welcome Email? = f.check_box :send_welcome_email I tried to make this an attr_accessible: :send_welcome_email but the controller does not recognize it. I get an undefined method 'send_welcome_email' for #&lt;User:0x00000100d080a8&gt; I would like it to look like this: What is the best way to get this working:

    Read the article

  • Connection problems - Celery/Django

    - by RadiantHex
    Hi folks, long night... can't get my second Celery/RabbitMQ setup run to work. step 1 sudo rabbitmq-server runs: ok! step 2 python manage.py celeryd -l info error: [2010-12-28 03:38:24,690: ERROR/MainProcess] CarrotListener: Connection Error: Socket closed. Trying again in 28 seconds... I have definitely: added rabbitmq user and vhost updated the Django setings.py Edit: I think it might have to with installing from a .deb instead of apt-get. After uninstalling the deb and installing the apt-get version I get this: invoke-rc.d: initscript rabbitmq-server, action "start" failed. dpkg: error processing rabbitmq-server (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: rabbitmq-server E: Sub-process /usr/bin/dpkg returned an error code (1) Any ideas on how I could debug this? :|

    Read the article

  • JQuery Buttonset - Add button

    - by leaf dev
    I am looking for a way to add a button to a JQuery buttonset at runtime with javascript. if(response.success) { var menuItem = document.createElement('a'); $(menuItem).attr('href', response.href); $(menuItem).attr('category-id', response.id); $(menuItem).text(title); $("#menu-buttonset").append(menuItem); } I am adding the hyperlink to the div container of the buttonset using javascript, and then re-calling buttonset() on the container. $("#menu-buttonset").buttonset(); This however does not seem to rebuild the buttonset as I expected. I am not seeing any function in the JQuery API for this either. Can anyone provide some insight?

    Read the article

  • Problem with Matlab functions

    - by appi
    HI. I got this matlab functionWhen I ran it, the following error messege showed up. Can anybody give me some hint? Thank you. The code is also shown below. [h,im_matched,theta,I,J]=im_reg_MI('keyframe1.jpg','keyframe2.jpg', 0, 1) ??? Undefined function or variable "h". Error in == im_reg_MI at 74 [a, b] = max(h(:));% finding the max of MI and indecises Below is the code. [h,im_matched, theta,I,J]=im_reg_MI(image1, image2, angle, step) [m,n]=size(image1); [p,q]=size(image2); [a,b]=size(angle); im1=round(image1); for k=1:b J = rotate_image(angle(k),image2); %rotated cropped IMAGE2 image21=round(J); [m1,n1]=size(image21); for i=1:step:(m1-m) for j=1:step:(n1-n) im2=image21(i:(i+m-1),j:(j+n-1)); % selecting part of IMAGE2 matching the size of IMAHE1 im2=round(im2); h(k,i,j)=MI2(im1,im2); % calculating MI end end end [a, b] = max(h(:));% finding the max of MI and indecises

    Read the article

  • vb.net press/release keys

    - by Cyclone
    How can you simulate keypresses and releases? I know you can essentially hit a key with Sendkeys.SendWait, but how can your code press and hold q, for example? Any help is much appreciated! Everything I find keeps pointing me at sendkeys, which is not correct. I essentially wish to be able to call something like press("q") and release("q"). The effect would be the same as physically holding them down. Thanks for your help!

    Read the article

  • ERROR: iPhone Private Frameworks "No such file or directory"

    - by WrightsCS
    I have added Private Frameworks To my project. When I build in DEVICE | RELEASE everything works fine and I am able to ldid -S the application and it successfully launches on my device. However, when trying to BUILD AND GO in Simulator, I get the error "No such file or directory" as indicated below: (I also get the error twice which is strange too.) Line Location HomeProfileViewController.h:10: error: BluetoothManager/BluetoothManager.h: No such file or directory Below are the project and build settings that I currently have, maybe someone can find a mistake and let me know, that would be awesome! PROJECT SETTINGS: PRIVATE_HEADERS_FOLDER_PATH = "/Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS3.0.sdk/include" PUBLIC_HEADERS_FOLDER_PATH = "/Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS3.0.sdk/include" USER_HEADER_SEARCH_PATHS = "/Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS3.0.sdk/include" OTHER_CFLAGS = "-I/Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS3.0.sdk/include-I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include-I/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/gcc/arm-apple-darwin9/4.0.1/include-F/System/Library/Frameworks-F/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/Frameworks-F/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/PrivateFrameworks-DMAC_OS_X_VERSION_MAX_ALLOWED=1050" TARGET BUILD SETTINGS: PRIVATE_HEADERS_FOLDER_PATH = "/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/PrivateFrameworks" FRAMEWORK_SEARCH_PATHS = "$(inherited) $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks" USER_HEADER_SEARCH_PATHS = "/Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS3.0.sdk/include/**" OTHER_CFLAGS = "-I/Developer/SDKs/iPhoneOS.sdk/Versions/iPhoneOS3.0.sdk/include-I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/include-I/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/gcc/arm-apple-darwin9/4.0.1/include-F/System/Library/Frameworks-F/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/Frameworks-F/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/PrivateFrameworks-DMAC_OS_X_VERSION_MAX_ALLOWED=1050" Note: The quotation marks in the paths aren't actually in my project, I put them in so the site will syntax them better. Cydia

    Read the article

  • boost multi_index partial indexes

    - by Gokul
    Hi, I want to implement inside boost multi-index two sets of keys with same search criteria but different eviction criteria. Say i have two sets of data with same search condition, but one set needs a MRU(Most Recently Used) list of 100 and the other set requires a MRU of 200. Say the entry is like this class Student { int student_no; char sex; std::string address; }; The search criteria is student_no, but for sex='m', we need MRU of 200 and for sex='f', we need a MRU of 100. Now i have a solution where in i introduce a new ordered index to maintain ordering. For example the IndexSpecifierList will be something like this typedef multi_index_container< Student, indexed_by< ordered_unique< member<Student, int, &Student::student_no> >, ordered_unique< composite_key< member<Student, char, &Student::sex>, member<Student, int, &Student::sex_specific_student_counter> > > > > student_set Now everytime, i am inserting a new one, i have to take a equal_range for that using index 2 and remove the oldest one and if something is getting re-used, i have to update it by incrementing the counter. Is there a better solution to this kind of problem? Thanks, Gokul.

    Read the article

  • null pointer exception when starting new activity

    - by acithium
    Okay, I'm getting a null pointer exception when I start my third activity. Here is the LogCat message: 12-28 04:38:00.350: ERROR/AndroidRuntime(776): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.acithium.main/com.acithium.rss.ShowDescription}: java.lang.NullPointerException 12-28 04:38:00.350: ERROR/AndroidRuntime(776): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401) 12-28 04:38:00.350: ERROR/AndroidRuntime(776): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417) 12-28 04:38:00.350: ERROR/AndroidRuntime(776): at android.app.ActivityThread.access$2100(ActivityThread.java:116) 12-28 04:38:00.350: ERROR/AndroidRuntime(776): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 12-28 04:38:00.350: ERROR/AndroidRuntime(776): at android.os.Handler.dispatchMessage(Handler.java:99) 12-28 04:38:00.350: ERROR/AndroidRuntime(776): at android.os.Looper.loop(Looper.java:123) 12-28 04:38:00.350: ERROR/AndroidRuntime(776): at android.app.ActivityThread.main(ActivityThread.java:4203) 12-28 04:38:00.350: ERROR/AndroidRuntime(776): at java.lang.reflect.Method.invokeNative(Native Method) 12-28 04:38:00.350: ERROR/AndroidRuntime(776): at java.lang.reflect.Method.invoke(Method.java:521) 12-28 04:38:00.350: ERROR/AndroidRuntime(776): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) 12-28 04:38:00.350: ERROR/AndroidRuntime(776): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) 12-28 04:38:00.350: ERROR/AndroidRuntime(776): at dalvik.system.NativeStart.main(Native Method) 12-28 04:38:00.350: ERROR/AndroidRuntime(776): Caused by: java.lang.NullPointerException 12-28 04:38:00.350: ERROR/AndroidRuntime(776): at com.acithium.rss.ShowDescription.onCreate(ShowDescription.java:48) 12-28 04:38:00.350: ERROR/AndroidRuntime(776): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123) 12-28 04:38:00.350: ERROR/AndroidRuntime(776): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364) 12-28 04:38:00.350: ERROR/AndroidRuntime(776): ... 11 more Here is the section of code where I call the activity: public void onItemClick(AdapterView parent, View v, int position, long id) { Log.i(tag,"item clicked! [" + feed.getItem(position).getTitle() + "]"); Intent itemintent = new Intent(this,com.acithium.rss.ShowDescription.class); //Intent itemintent = new Intent(); //itemintent.setClassName("com.acithium.main", "com.acithium.rss.ShowDescription"); Bundle b = new Bundle(); b.putString("title", feed.getItem(position).getTitle()); b.putString("description", feed.getItem(position).getDescription()); b.putString("link", feed.getItem(position).getLink()); itemintent.putExtra("android.intent.extra.INTENT", b); startActivityForResult(itemintent,0); } And here is new activity class that is called: public class ShowDescription extends Activity { public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.showdescription); String theStory = null; Intent startingIntent = getIntent(); if (startingIntent != null) { Bundle b = startingIntent.getBundleExtra("android.intent.extra.INTENT"); if (b == null) { theStory = "bad bundle?"; } else { theStory = b.getString("title") + "\n\n" + b.getString("description") + "\n\nMore information:\n" + b.getString("link"); } } else { theStory = "Information Not Found."; } TextView db= (TextView) findViewById(R.id.storybox); db.setText(theStory); Button backbutton = (Button) findViewById(R.id.back); backbutton.setOnClickListener(new Button.OnClickListener() { public void onClick(View v) { finish(); } }); } }

    Read the article

  • JQuery click anywhere except certain divs and issues with dynamically added html

    - by jCuga
    I want this webpage to highlight certain elements when you click on one of them, but if you click anywhere else on the page, then all of these elements should no longer be highlighted. I accomplished this task by the following, and it works just fine except for one thing (described below): $(document).click(function() { // Do stuff when clicking anywhere but on elements of class suggestion_box $(".suggestion_box").css('background-color', '#FFFFFF'); }); $(".suggestion_box").click(function() { // means you clicked on an object belonging to class suggestion_box return false; }); // the code for handling onclicks for each element function clickSuggestion() { // remove all highlighting $(".suggestion_box").css('background-color', '#FFFFFF'); // then highlight only a specific item $("div[name=" + arguments[0] + "]").css('background-color', '#CCFFCC'); } This way of enforcing the highlighting of elements works fine until I add more html to the page without having a new page load. This is done by .append() and .prepend() What I suspected from debugging was that the page is not "aware" of the new elements that were added to the page dynamically. Despite the new, dynamically added elements having the appropriate class names/IDs/names/onclicks ect, they never get highlighted like the rest of the elements (which continue to work fine the entire time). I was wondering if a possible reason for why my approach does not work for the dynamically added content is that the page is not able to recognize the elements that were not present during the pageload. And if this is a possibility, then is there a way to reconcile this without a pageload? If this line of reasoning is wrong, then the code I have above is probably not enough to show what's wrong with my webpage. But I'm really just interested in whether or not this line of thought is a possibility.

    Read the article

  • Store XML,update record in XML,retrive a specific record in XML stored on BB device

    - by user469999
    I am writing a blackberry application where i want to store the data returned by a web service in my BB device.Earlier i was going to use SQLite for storing the data in mobile but as i googled and also did programming using SQLite and found that some BB devices dont support SQLite library and fail to create the database.Then i decided to keep the data returned by webservice in a XML format on my BB device. I just want to know is there any method or way in blackberry through which i can parse the data stored in xml,update it,or directly access a particular record stored in the xml instead of traversing the whole xml n times and finding the matched record. Please guide me as i am new to storing data in BB device.Is the approach which i am thinking to store data in XML right or shall i use something else Thanks in advance Yogesh Chaudhari

    Read the article

  • Ruby - overriding/enabling multiple assignment (e.g. `a, b, c = d, e, f`)

    - by nicholaides
    In ruby, you can do this: d = [1, 2, 3] a, b, c = d a, b, and c, will receive the values 1, 2, and 3, respectively. d, in this case in an Array and ruby knows to assign it's contents to a, b, and c. But, if d were a Fixnum, for example, only a would be assigned to the value of d while b and c would be assigned nil. What properties of d allow it to be used for multiple assignment? In my exploring so far, I've only been able to make instances of subclasses of Array behave in this way.

    Read the article

  • Low Power Speed Monitoring

    - by user555584
    I am aware of speed detection via gps, however as a background app, I am concerned about high power drain. I am looking to detect speed, say over 5mph, but it does not have to be accurate, say like a speedometer. Is there a low power way to detect if the phone is in motion, say by triangulation, or tracking tower strength and new/recently lost towers? I have an app design that is dependent on running in the background upon launch and knowing if the phone is in a car or not. Thanks!

    Read the article

  • EF4 Import/Lookup thousands of records - my performance stinks!

    - by Dennis Ward
    I'm trying to setup something for a movie store website (using ASP.NET, EF4, SQL Server 2008), and in my scenario, I want to allow a "Member" store to import their catalog of movies stored in a text file containing ActorName, MovieTitle, and CatalogNumber as follows: Actor, Movie, CatalogNumber John Wayne, True Grit, 4577-12 (repeated for each record) This data will be used to lookup an actor and movie, and create a "MemberMovie" record, and my import speed is terrible if I import more than 100 or so records using these tables: Actor Table: Fields = {ID, Name, etc.} Movie Table: Fields = {ID, Title, ActorID, etc.} MemberMovie Table: Fields = {ID, CatalogNumber, MovieID, etc.} My methodology to import data into the MemberMovie table from a text file is as follows (after the file has been uploaded successfully): Create a context. For each line in the file, lookup the artist in the Actor table. For each Movie in the Artist table, lookup the matching title. If a matching Movie is found, add a new MemberMovie record to the context and call ctx.SaveChanges(). The performance of my implementation is terrible. My expectation is that this can be done with thousands of records in a few seconds (after the file has been uploaded), and I've got something that times out the browser. My question is this: What is the best approach for performing bulk lookups/inserts like this? Should I call SaveChanges only once rather than for each newly created MemberMovie? Would it be better to implement this using something like a stored procedure? A snippet of my loop is roughly this (edited for brevity): while ((fline = file.ReadLine()) != null) { string [] token = fline.Split(separator); string Actor = token[0]; string Movie = token[1]; string CatNumber = token[2]; Actor found_actor = ctx.Actors.Where(a => a.Name.Equals(actor)).FirstOrDefault(); if (found_actor == null) continue; Movie found_movie = found_actor.Movies.Where( s => s.Title.Equals(title, StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault(); if (found_movie == null) continue; ctx.MemberMovies.AddObject(new MemberMovie() { MemberProfileID = profile_id, CatalogNumber = CatNumber, Movie = found_movie }); try { ctx.SaveChanges(); } catch { } } Any help is appreciated! Thanks, Dennis

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >