Search Results

Search found 6730 results on 270 pages for 'loaded'.

Page 16/270 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Pre loaded database on iPhone?

    - by Julian
    Hi, I have recently developed an app using core data as the storage db. The app allowed the user to read and write to the db. I am now developing a new app which the user doesnt need to write anything to the db, instead the app just needs to read the data. The data has relationships etc so cannot just use a plist or something similar. My question is should I use core data for such a requirement and if so how would i go about entering the data and then releasing the app. Would I have to code the data entry which would populate the db then remove all this code (as I dont want the database to repopulate every time the user opens the app)?? Is there a way to create a core data model using sql commands as with sqlite ie insert into..... etc? Any ideas/thoughts would be very helpful. Many thanks Jules

    Read the article

  • Arraylist can't compare objects after they are loaded from disk

    - by Zka
    To make it easy, lets say I have an arraylist allBooks containing class "books" and an arraylist someBooks containing some but not all of the "books". Using contains() method worked fine when I wanted to see if a book from one arraylist was also contained in another. The problem was that this isn't working anymore when I save both of the Arraylists to a .bin file and load them back once the program restarts. Doing the same test as before, the contains() returns false even if the compared objects are the same (have the same info inside). I solved it by overloading the equals method and it works fine, but I want to know why did this happen?

    Read the article

  • Draw Circle on the Map once the application gets loaded

    - by TechGeeky
    Background:- In my application what is happening currently- Whenever I am opening the application, In the top half of the android screen, it draws a Map and in the bottom half of the android screen it show's a list view. And then as soon as the location gets changed, it draw's a Circle with the current location as the center of the circle and show's an image at the current location(center of circle). Everything is working fine till here- Problem Statement:- What I want is when the user opens my application, circle should get draw immediately on the Google Map (this is currently not happening, it draw's circle only on the location changed), without waiting for the location to get changed and without any image on the center of circle and then if the location get's changed, take the current location as the center of circle and draw the circle with an image at the center of circle. And this is my below code which fulfills the scenario that I mentioned in my Background- How can I make this code to work the way I wanted to? hope I am clear enough in my question. Any suggestions will be appreciated. @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mapView = (MapView) findViewById(R.id.mapView); listView = (ListView) findViewById(R.id.mylist); locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); locationListener = new GPSLocationListener(mapView); locationManager.requestLocationUpdates( LocationManager.GPS_PROVIDER, 35000, 10, locationListener); mapView.setStreetView(true); mapView.setBuiltInZoomControls(true); mapController = mapView.getController(); mapController.setZoom(14); } Location Update class where I am sending the request to Overlay to draw the circle private class GPSLocationListener implements LocationListener { MapOverlay mapOverlay; public GPSLocationListener(MapView mapView) { } @Override public void onLocationChanged(Location location) { if (location != null) { GeoPoint point = new GeoPoint( (int) (location.getLatitude() * 1E6), (int) (location.getLongitude() * 1E6)); mapController.animateTo(point); mapController.setZoom(15); if (mapOverlay == null) { mapOverlay = new MapOverlay(this,android.R.drawable.star_on); List<Overlay> listOfOverlays = mapView.getOverlays(); listOfOverlays.add(mapOverlay); } mapOverlay.setPointToDraw(point); mapView.invalidate(); } } @Override public void onProviderDisabled(String provider) { } @Override public void onProviderEnabled(String provider) { } @Override public void onStatusChanged(String provider, int status, Bundle extras) { } } Class in which circle is getting drawn. class MapOverlay extends Overlay { private GeoPoint pointToDraw; int[] imageNames=new int[6]; private Point mScreenPoints; private Bitmap mBitmap; private Paint mCirclePaint; public MapOverlay(GPSLocationListener gpsLocationListener, int currentUser) { imageNames[0]=currentUser; mCirclePaint = new Paint(Paint.ANTI_ALIAS_FLAG); mCirclePaint.setColor(0x30000000); mCirclePaint.setStyle(Style.FILL_AND_STROKE); mBitmap = BitmapFactory.decodeResource(getResources(),imageNames[0]); mScreenPoints = new Point(); } public void setPointToDraw(GeoPoint point) { pointToDraw = point; } public GeoPoint getPointToDraw() { return pointToDraw; } @Override public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when) { super.draw(canvas, mapView, shadow); if (pointToDraw == null) { return true; } mScreenPoints = mapView.getProjection().toPixels(pointToDraw, mScreenPoints); int totalCircle=5; int radius=40; int centerimagesize=35; for (int i = 1; i <= totalCircle; i ++) { canvas.drawCircle(mScreenPoints.x,mScreenPoints.y, i*radius, mCirclePaint); } canvas.drawBitmap(mBitmap, (mScreenPoints.x-(centerimagesize/2)),(mScreenPoints.y-(centerimagesize/2)), null); super.draw(canvas,mapView,shadow); return true; } }

    Read the article

  • Accessing children of loaded swf in Flex Image component

    - by pfunc
    I am loading an external swf into an component. It loads everything fine and I can see buttons working in the swf, but I can't seem to figure out how to add children to this swf from the core mxml file. I have tried tracing out all the children of the image component but can't find where or how to do this. This is the image component: <Image id="image" mask="{ maskCanvas }" source="{ _source }" mouseDown="image.startDrag()" visible="{ _source != null &amp;&amp; image.percentLoaded == 100 }" showEffect="{ fadeInEffect }" complete="imageComplete()" doubleClickEnabled="true" doubleClick="onDoubleClick()" /> And in my AS, I am trying to do something like this: myComponent.image.addChild("myMC"); But i either don;t see the clip or there I get an error about not being able to add the child to a ui component.

    Read the article

  • When are referenced Assemblies loaded?

    - by Daniel
    I wrote a program that makes a reference to Microsoft.Web.Administration.dll, which is not present on Windows Server 2003. The program checks for the os and does not reference the dll if the os is 2003. if(OSVersion == WindowsServer2003) //do the job without referencing the Microsoft.Web.Administration.<br> else if(OSVersion == WindowsServer2008) //reference the Microsoft.Web.Administration.dll file.<br> When I tested this program on Windows Server 2003, an error occured telling me it couldn't locate the Microsoft.Web.Administration.dll. But when I separated the if-else block into 2 different methods as below, and the error did not occur. if(OSVersion == WindowsServer2003) //do the job without referencing the Microsoft.Web.Administration.<br> else if(OSVersion == WindowsServer2008) //DoIt2008Style(); So I wanted to know about reference file loading time in more detail. could you point me to some resources?

    Read the article

  • Find what filetype is loaded in vim

    - by ruturaj
    As soon as I load any file in vim, It'll try to detect the file and color-highlight it if possible. I want to know a vim command that will tell me which ftplugin or Filetype plugin / filetype is vim considering to highlight the file.

    Read the article

  • C# arraylist can't compare objects after they are loaded from disk

    - by Zka
    To make it easy, lets say I have an arraylist allBooks containing class "books" and an arraylist someBooks containing some but not all of the "books". Using contains() method worked fine when I wanted to see if a book from one arraylist was also contained in another. The problem was that this isn't working anymore when I save both of the Arraylists to a .bin file and load them back once the program restarts. Doing the same test as before, the contains() returns false even if the compared objects are the same (have the same info inside). I solved it by overloading the equals method and it works fine, but I want to know why did this happen?

    Read the article

  • Can't access variables from dynamically loaded javascript

    - by Menno
    I'm using a fairly simple system to load javascript dynamically: include = function (url) { var e = document.createElement("script"); e.src = url; e.type="text/javascript"; document.getElementsByTagName("head")[0].appendChild(e); }; Let's say I have a file test.js which has the following contents: var foo = 4; Now, in my original script, I want to use include(test.js); console.log(foo); However, I get a 'foo has not been defined' error on this. I'm guessing it has to do with the dynamic script being included as the last child of the <head> tag. How can I get this to work?

    Read the article

  • Parameter to swf loaded with loader class

    - by alejandrobog
    Hi im loading a child swf into my parent swf and I want to pass some parameters to the child swf. Any idea on how to do this. Here is my code: var req:URLRequest = new URLRequest( "test.swf" ); var loader:Loader = new Loader(); loader.contentLoaderInfo.addEventListener( Event.COMPLETE, loadComplete ); loader.load(req); function loadComplete(e:Event){ var childSwf:DisplayObject = e.target.content as DisplayObject; //Im guessing here I need to set the parameter VideoContainer.addChild(childSwf); }

    Read the article

  • Add something to symbol in dynamicly loaded swf (ActionScript 3)

    - by user1468671
    I have a program written in Flash Builder with Flex 4.6 sdk and swf movie with some symbols inside. Those symbols moving around the stage. What I need is load that swf in my program and replace one of those symbols to my bitmap and show whole swf in flashContainer. There is my code for now: var swfLoader:Loader = new Loader(); var bgUrl:URLRequest = new URLRequest("testMovie.swf"); swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, function(event: Event) : void { var movie: MovieClip = event.target.content; var headClass: Class = movie.loaderInfo.applicationDomain.getDefinition("headSymbol") as Class; var head:MovieClip = new headClass() as MovieClip; head.addChild(bmp); flashContainer.source = movie; }); but in flashContainer showed old movie. If I do flashContainer.source = head; then only head with my bmp appears. Need help. And sorry for my bad English.

    Read the article

  • Debugging scripts loaded with GroovyShell (in eclipse)

    - by MSh
    I am working with eclipse and groovy plug in. I am building a test harness to debug and test groovy scripts. The scripts are really simple but long, most of them just if/else/return. I figured out that I can call them using GroovyShell and Bindings to pass in the values. The problem is that, while I can call the script and get the results just fine, I CAN NOT step in there with the debugger. Breakpoints in those scripts are not active. Is there a way to debug the scripts? Maybe I should use something other than GroovyShell? I really don't want to modify the scripts by wrapping them into functions, and then calling those functions from my test classes. That's how I am using Binding and GroovyShell: def binding = new Binding(); binding.lineList = [list1]; binding.count = 5; def shell = new GroovyShell(binding); def result = shell.evaluate(new File("src/Rules/checkLimit.groovy"));

    Read the article

  • Using "from __future__ import division" in my program, but it isn't loaded with my program

    - by Sara Fauzia
    I wrote the following program in Python 2 to do Newton's method computations for my math problem set, and while it works perfectly, for reasons unbeknownst to me, when I initially load it in ipython with %run -i NewtonsMethodMultivariate.py, the Python 3 division is not imported. I know this because after I load my Python program, entering x**(3/4) gives "1". After manually importing the new division, then x**(3/4) remains x**(3/4), as expected. Why is this? # coding: utf-8 from __future__ import division from sympy import symbols, Matrix, zeros x, y = symbols('x y') X = Matrix([[x],[y]]) tol = 1e-3 def roots(h,a): def F(s): return h.subs({x: s[0,0], y: s[1,0]}) def D(s): return h.jacobian(X).subs({x: s[0,0], y: s[1,0]}) if F(a) == zeros(2)[:,0]: return a else: while (F(a)).norm() > tol: a = a - ((D(a))**(-1))*F(a) print a.evalf(10) I would use Python 3 to avoid this issue, but my Linux distribution only ships SymPy for Python 2. Thanks to the help anyone can provide. Also, in case anyone was wondering, I haven't yet generalized this script for nxn Jacobians, and only had to deal with 2x2 in my problem set. Additionally, I'm slicing the 2x2 zero matrix instead of using the command zeros(2,1) because SymPy 0.7.1, installed on my machine, complains that "zeros() takes exactly one argument", though the wiki suggests otherwise. Maybe this command is only for the git version.

    Read the article

  • AppDomain assemblies not being loaded correctly.

    - by SharePoint Newbie
    Hi, We are doing the following in the Application_Start (Global.ascx.cs) for a WCF Service hosted by IIS 7.0 (integrated pipeline). var mapperConfigurations = AppDomain.CurrentDomain.GetAssemblies() .SelectMany(a => a.GetExportedTypes().Where(t => typeof (IMapperConfiguration).IsAssignableFrom(t) && t.IsClass)) .ToList(); The web-service has 8-10 assemblies in its bin folder and each of them have multiple implementations of IMapperConfiguration. After an IIS Reset, no mapper configurations are found (found this using debug.write). However, this behaviour is inconsistent and at other times all implementations of IMapperConfiguration are found. When exactly does IIS load assemblies and what is wrong with this code? Thanks

    Read the article

  • Clone elements and load previously loaded scripts

    - by kuswantin
    Hi, I am using clone() to move certain elements into another place in the DOM, but had trouble due to the fact that the scripts previously rendered was not available anymore when called from the cloned elements. So I think I need to call them again, but one by one will be a PITA. Perhaps getScript will do, but I have no idea to call more than one. Any help would be very much appreciated. Thanks

    Read the article

  • How to read loaded image into a blob?

    - by Gajus Kuizinas
    I am facing same-origin policy restrictions when loading remote images. However DOM 0 Image object can be used to load a remote resource (this is essentially the same as creating an <img /> tag). var fr = new FileReader(), img = new Image(); img.src = 'http://distilleryimage8.s3.amazonaws.com/6cf25568491a11e2af8422000a9e28e9_7.jpg'; img.onload = function () { // how to get this image as a Blob object? }; Is there a way to read this resource into a Blob/arraybuffer object? This is not a duplicate of How to convert an image object to a binary blob as the latter does not rise with same-origin issues.

    Read the article

  • Set cookie value before view loaded in MVC?

    - by James123
    I need to set a cookie value before my view called. otherwise I have to refresh the page to get cookie value in the view. The problem here is the value of cookie will get in controller. [HttpGet] [Route("Abstract/{meetingCode}")] [AllowAnonymous] public ActionResult Index(string meetingCode) { var meetingAbstract = new MeetingAbstract(); meetingAbstract.Meeting = _abstractContext.GetMeetingWithMeetingCode(meetingCode); if (meetingAbstract.Meeting != null) { var cookie = new HttpCookie("_culture"); cookie.Value = meetingAbstract.Meeting.language.language_locale_code;//"en-US"; cookie.Expires = DateTime.Now.AddDays(365); cookie.Path = "/"; this.ControllerContext.HttpContext.Response.Cookies.Add(cookie); ... Any other way without refresh the page again to set cookie value?

    Read the article

  • How to find dynamically loaded modules (the static ones) programatically in windows

    - by Ryan Rohrer
    I'm trying to port the unix utility ldd to windows, because dependency walker and cygcheck don't quite give me the usage I'm looking for. (also for the learning experience) Ive been looking all over MSDN, for a windows API that lists dll dependencies of an executable, or even the storage format in the complied exe (just to filter it out), but I've been unable to find anything. If anyone knows what API call windows uses for listing modules to load, or what patterns I can search for in an executable to find modules to load, please help me out :) thanks! -note: I'm not looking to profile for dynamic modules, just list the ones that are required at runtime

    Read the article

  • how to call a js function from loaded jquery

    - by Y.G.J
    the function is in the page loading the ajax but i'm trying to call the function codes: [ajax] $.ajax({ type: "POST", url: "loginpersonal.asp", data: "id=<%=request("id")%>", beforeSend: function() { $("#personaltab").hide(); }, success: function(msg){ $("#personaltab").empty().append(msg); }, complete: function() { $("#personaltab").slideDown(); }, error: function() { $("#personaltab").append("error").slideDown(); } }); [the js function] function GetCount(t){ if(t>0) { total = t } else { total -=1; } amount=total; if(amount < 0){ startpersonalbid(); } else{ days=0;hours=0;mins=0;secs=0;out=""; days=Math.floor(amount/86400);//days amount=amount%86400; hours=Math.floor(amount/3600);//hours amount=amount%3600; mins=Math.floor(amount/60);//minutes amount=amount%60; secs=Math.floor(amount);//seconds if(days != 0){out += days +":";} if(days != 0 || hours != 0){out += hours +":";} if(days != 0 || hours != 0 || mins != 0){out += ((mins>=10)?mins:"0"+mins) +":";} out += ((secs>=10)?secs:"0"+secs) ; document.getElementById('countbox').innerHTML=out; setTimeout("GetCount()", 1000); } } window.onload=function(){ GetCount(<%= DateDiff("s", Now,privatesellstartdate&" "&privatesellstarttime ) %>); so at the end of the loginpersonal.asp from the ajax... if it does what it suppose to do... i'm trying to call the function GetCount() again.

    Read the article

  • jQuery .load() call doesn't execute javascript in loaded html file

    - by Mike
    This seems to be a problem related to Safari only. I've tried 4 on mac and 3 on windows and am still having no luck. What I'm trying to do is load an external html file and have the Javascript that is embedded execute. The code I'm trying to use is this: $("#myBtn").click(function() { $("#myDiv").load("trackingCode.html"); }); trackingCode.html looks like this (simple now, but will expand once/if I get this working): <html> <head> <title>Tracking HTML File</title> <script language="javascript" type="text/javascript"> alert("outside the jQuery ready"); $(function() { alert("inside the jQuery ready"); }); </script> </head> <body> </body> </html> I'm seeing both alert messages in IE (6 & 7) and Firefox (2 & 3). However, I am not able to see the messages in Safari (the last browser that I need to be concerned with - project requirements - please no flame wars). Any thoughts on why Safari is ignoring the Javascript in the trackingCode.html file? Eventually I'd like to be able to pass Javascript objects to this trackingCode.html file to be used within the jQuery ready call, but I'd like to make sure this is possible in all browsers before I go down that road. Thanks for your help!

    Read the article

  • second external javscript file not loaded

    - by YsoL8
    Hi I have these lines in my html head section <script type="text/javascript" src="../behaviour/location.js"></script> <script type="text/javascript" src="../behaviour/ajax.js"></script> When I use either in isolation, the code in the external files executes as expected. However, when I use both, I find that neither works correctly. What do I need to do to fix this?

    Read the article

  • Change Dll loaded with MEF

    - by Tim
    Hi all, I'm using MEF and the System.ComponentModel.Composition.dll to load some dll. I'm doing something like : AggregateCatalog catalog = new AggregateCatalog(new AssemblyCatalog(Assembly.GetExecutingAssembly()), new DirectoryCatalog(directory)); _container = new CompositionContainer(catalog); _container.ComposeParts(this); to import my dll. After some times, I would like to update my dll but if I try to delete it, I have an access denied, because it's alrealdy used by the program. How can I release the dll, replace with a new dll and load the dll again ? (without closing the program) Thanks in advance for your help

    Read the article

  • [PHP] Variables loaded from a separate script are not defined within functions

    - by Goro
    Hello, I use settings.php to store general settings for my application. When I load this settings file, I can use the variables defined in settings.php in the script itself, but not within any functions I define in it. For example, in my class definition, myclass.php: <?php $preIP = dirname(__FILE__); require_once( "preIP/settings.php" ); class MyClass { ... public function foo() { echo $variable_from_settings; } } The code in the function foo() will not work (the variable will not be defined). The settings.php file looks like this: $variable_from_settings = "bar"; Thanks,

    Read the article

  • Magento get loaded collection

    - by Zertalx
    Hey guys I got an issue in magento when listing products. $_productCollection = array(); $key = 'product_collection_'.Mage::app()->getRequest()->getRequestUri(); $_productCollection = Mage::helper('cache')->getDataInCache($key); if (empty($_productCollection)) { $_productCollection=$this->getLoadedProductCollection(); Mage::helper('cache')->setDataInCache($key,$_productCollection,'front_end_collection'); } That's my code, i'm loading the collection and saved in cache, the problem is that I added new products from the admin panel but they are not showing up in the listing. I have refreshed cache, reindex all the data and checke that the products were in stock. Also check the visibility because i understand that the collection gets just the visible products, am i correct? I'm using magento enterprise 1.9 I'm new in magento and i'm having troubles understanding how the Collections works, i hope somebody can help me. Thanks

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >