Search Results

Search found 982 results on 40 pages for 'ryan rosario'.

Page 25/40 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • Mac CoreLocation Services does not ask for permissions

    - by Ryan Nichols
    I'm writing a Mac App that needs to use CoreLocation services. The code and location works fine, as long as I manually authenticate the service inside the security preference pane. However the framework is not automatically popping up with a permission dialog. The documentation states: Important The user has the option of denying an application’s access to the location service data. During its initial uses by an application, the Core Location framework prompts the user to confirm that using the location service is acceptable. If the user denies the request, the CLLocationManager object reports an appropriate error to its delegate during future requests. I do get an error to my delegate, and the value of +locationServicesEnabled is correct on CLLocationManager. The only part missing is the prompt to the user about permissions. This occurs on my development MPB and a friends MBP. Neither of us can figure out whats wrong. Has anyone run into this? Relevant code: _locationManager = [CLLocationManager new]; [_locationManager setDelegate:self]; [_locationManager setDesiredAccuracy:kCLLocationAccuracyKilometer]; ... [_locationManager startUpdatingLocation]; UPDATE: Answer It seems there is a problem with Sandboxing in which the CoreLocation framework is not allowed to talk to com.apple.CoreLocation.agent. I suspect this agent is responsible for prompting the user for permissions. If you add the Location Services Entitlement (com.apple.security.personal-information.location) it only gives your app the ability to use the CL framework. However you also need access to the CoreLocation agent to ask the user for permissions. You can give your app access by adding the entitlement 'com.apple.security.temporary-exception.mach-lookup.global-name' with a value of 'com.apple.CoreLocation.agent'. Users will be prompted for access automatically like you would expect. I've filed a bug to apple on this already.

    Read the article

  • Why qry.post executed with asynchronous mode?

    - by Ryan
    Recently I met a strange problem, see code snips as below: var sqlCommand: string; connection: TADOConnection; qry: TADOQuery; begin connection := TADOConnection.Create(nil); try connection.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Test.MDB;Persist Security Info=False'; connection.Open(); qry := TADOQuery.Create(nil); try qry.Connection := connection; qry.SQL.Text := 'Select * from aaa'; qry.Open; qry.Append; qry.FieldByName('TestField1').AsString := 'test'; qry.Post; beep; finally qry.Free; end; finally connection.Free; end; end; First, Create a new access database named test.mdb and put it under the directory of this test project, we can create a new table named aaa in it which has only one text type field named TestField1. We set a breakpoint at line of "beep", then lunch the test application under ide debug mode, when ide stops at the breakpoint line (qry.post has been executed), at this time we use microsoft access to open test.mdb and open table aaa you will find there are no any changes in table aaa, if you let the ide continue running after pressing f9 you can find a new record is inserted in to table aaa, but if you press ctrl+f2 to terminate the application at the breakpoint, you will find the table aaa has no record been inserted, but in normal circumstance, a new record should be inserted in to the table aaa after qry.post executed. who can explain this problem , it troubles me so long time. thanks !!! BTW, the ide is delphi 2010, and the access mdb file is created by microsoft access 2007 under windows 7

    Read the article

  • Why is the ASP.NET Repeater.Items collection empty, when controls are on the screen?

    - by Ryan
    I have an ASP page with the following repeater: <asp:Repeater runat="server" ID="RegionRepeater" DataSourceID="SqlDataSourceRegions" EnableViewState="true"> <ItemTemplate> <tr> <td valign="top"> <b><%#Eval("description")%></b> <asp:HiddenField runat="server" ID="RegionID" Value='<%#Eval("region_id")%>'/> </td> <td> <asp:FileUpload ID="FileUpload" runat="server" Width="368px" /> </td> </tr> </ItemTemplate> </asp:Repeater> (The repeater is inside a Wizard, inside a content pane). The code behind is connected to the protected void Wizard1_NextButtonClick(object sender, WizardNavigationEventArgs e) event. There are two items on the screen (two rows inside the table). However, when the code tries to read those items, the Items collection is empty! foreach(RepeaterItem region in RegionRepeater.Items) { // Never runs - the RegionRepeater.Items.Count = 0 FileUpload fileUpload = (FileUpload) region.FindControl("FileUpload"); String regionID = ((HiddenField)region.FindControl("RegionID")).Value; ... Why is the collection empty, when there are controls drawn on the screen? Thanks a lot for any help; this is starting to drive me nuts. (BTW: I tried adding/removing the EnableViewState="true" tag)

    Read the article

  • Android - Linkify Problem

    - by Ryan
    I seem to be having trouble with the linkify I am using in my Custom Adapter. For some reason I recieve the following stack track when I click on one of the links: 06-07 20:49:34.696: ERROR/AndroidRuntime(813): Uncaught handler: thread main exiting due to uncaught exception 06-07 20:49:34.745: ERROR/AndroidRuntime(813): android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want? 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.app.ApplicationContext.startActivity(ApplicationContext.java:550) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.content.ContextWrapper.startActivity(ContextWrapper.java:248) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.text.style.URLSpan.onClick(URLSpan.java:62) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.text.method.LinkMovementMethod.onTouchEvent(LinkMovementMethod.java:216) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.widget.TextView.onTouchEvent(TextView.java:6560) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.view.View.dispatchTouchEvent(View.java:3709) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107) 06-07 20:49:34.745: ERROR/AndroidRuntime(813): at android.app.Activity.dispatchTouchEvent(Activity.java:2061) Here is the code that is calling it: TextView bot = new TextView( c ); bot.setText(li.getBottomText()); bot.setTextColor(Color.BLACK); bot.setTextSize(12); bot.setPadding(50, 35, 0, 10); Linkify.addLinks(bot, Linkify.ALL); rL.addView(bot,ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); I understand what the error is saying but I am not sure how to fix it. Does anyone have any ideas? Thanks in advance for your help!

    Read the article

  • Is There a More Efficient Way to Write Nested While Loops?

    - by Ryan
    The code below shows nested while loops, but it's not the very efficient. Suppose I wanted to extend the code to include 100 nested while loops. Is there a better way to accomplish this task? <?php $count = 1; $num = 1; $options=3; while ( $num <=$options ) { echo "(".$num . ") "; $num1 = 1; $options1=3; while ( $num1 <=$options1 ) { echo "*".$num1 . "* "; $num2 = 1; $options2=3; while ( $num2 <=$options2 ) { echo "@".$num2 . "@ "; $num3 = 1; $options3=3; while ( $num3 <=$options3 ) { echo $num3 . " "; $num3++; $count++; } echo "<br />"; $num2++; } echo "<br />"; $num1++; } echo "<br />"; $num++; } echo $count; ?>

    Read the article

  • Isn't it better to use a single try catch instead of tons of TryParsing and other error handling sometimes?

    - by Ryan Peschel
    I know people say it's bad to use exceptions for flow control and to only use exceptions for exceptional situations, but sometimes isn't it just cleaner and more elegant to wrap the entire block in a try-catch? For example, let's say I have a dialog window with a TextBox where the user can type input in to be parsed in a key-value sort of manner. This situation is not as contrived as you might think because I've inherited code that has to handle this exact situation (albeit not with farm animals). Consider this wall of code: class Animals { public int catA, catB; public float dogA, dogB; public int mouseA, mouseB, mouseC; public double cow; } class Program { static void Main(string[] args) { string input = "Sets all the farm animals CAT 3 5 DOG 21.3 5.23 MOUSE 1 0 1 COW 12.25"; string[] splitInput = input.Split(' '); string[] animals = { "CAT", "DOG", "MOUSE", "COW", "CHICKEN", "GOOSE", "HEN", "BUNNY" }; Animals animal = new Animals(); for (int i = 0; i < splitInput.Length; i++) { string token = splitInput[i]; if (animals.Contains(token)) { switch (token) { case "CAT": animal.catA = int.Parse(splitInput[i + 1]); animal.catB = int.Parse(splitInput[i + 2]); break; case "DOG": animal.dogA = float.Parse(splitInput[i + 1]); animal.dogB = float.Parse(splitInput[i + 2]); break; case "MOUSE": animal.mouseA = int.Parse(splitInput[i + 1]); animal.mouseB = int.Parse(splitInput[i + 2]); animal.mouseC = int.Parse(splitInput[i + 3]); break; case "COW": animal.cow = double.Parse(splitInput[i + 1]); break; } } } } } In actuality there are a lot more farm animals and more handling than that. A lot of things can go wrong though. The user could enter in the wrong number of parameters. The user can enter the input in an incorrect format. The user could specify numbers too large or too small for the data type to handle. All these different errors could be handled without exceptions through the use of TryParse, checking how many parameters the user tried to use for a specific animal, checking if the parameter is too large or too small for the data type (because TryParse just returns 0), but every one should result in the same thing: A MessageBox appearing telling the user that the inputted data is invalid and to fix it. My boss doesn't want different message boxes for different errors. So instead of doing all that, why not just wrap the block in a try-catch and in the catch statement just display that error message box and let the user try again? Maybe this isn't the best example but think of any other scenario where there would otherwise be tons of error handling that could be substituted for a single try-catch. Is that not the better solution?

    Read the article

  • Is it possible to take a screenshot of a web page with Javascript or HTML5/Canvas?

    - by Ryan Kearney
    Is there a way I could insert some code into a page that would take a screenshot of what the user sees in the browser window, then upload that image via a web form of some sort? I'm working on a clone of a pay-to-use service that lets you install a widget on a web page which in turn allows viewers to report bugs in the sites layout. Currently they use a Java applet to take the screenshot, which, in my opinion, is probably the worst way to go about it (aside from requiring the user to install a plugin) Is there a javascript/flash/other alternative? Thanks

    Read the article

  • jQuery setInterval loop not holding variable

    - by Ryan
    Here is my code: var showNo = 1; window.setInterval(function() { if(showNo === 1) { var nextNo = 2; } else if(showNo === 2) { var nextNo = 3; } else if(showNo === 3) { var nextNo = 4; } else if(showNo === 4) { var nextNo = 5; } else if(showNo === 5) { var nextNo = 1; } else { var showNo = 1; var nextNo = 2; } var showNo = nextNo; }, 500); My question is, why is the showNo variable not holding when the setInterval loop starts? This may be a simple question, but I am trying to teach myself query and this has me stuck.. Any answers would be great. Thanks.

    Read the article

  • Did Delphi ever get a for each loop?

    - by Ryan
    Hello, I've read that Delphi was supposed to get a for each loop in Delphi 9. Did this functionality ever make it into the language? My Delphi 2009 IDE doesn't seem to recognize the for each syntax. Here's my code: procedure ProcessDirectory(p_Directory, p_Output : string); var files : TStringList; filePath : string; begin files := GetSubfiles(p_Directory); try for (filePath in files.Strings) do begin // do something end; finally files.Free; end; end;

    Read the article

  • ERROR: Failed to build gem native extension (mysql2 on rails 3.2.3)

    - by Ryan Arneson
    I'm trying to install the mysql2 gem with Rails 3.2.3 and it's failing: ? bundle install Fetching gem metadata from https://rubygems.org/......... Using rake (0.9.2.2) Using i18n (0.6.0) Using multi_json (1.2.0) Using activesupport (3.2.3) Using builder (3.0.0) Using activemodel (3.2.3) Using erubis (2.7.0) Using journey (1.0.3) Using rack (1.4.1) Using rack-cache (1.2) Using rack-test (0.6.1) Using hike (1.2.1) Using tilt (1.3.3) Using sprockets (2.1.2) Using actionpack (3.2.3) Using mime-types (1.18) Using polyglot (0.3.3) Using treetop (1.4.10) Using mail (2.4.4) Using actionmailer (3.2.3) Using arel (3.0.2) Using tzinfo (0.3.32) Using activerecord (3.2.3) Using activeresource (3.2.3) Using bundler (1.1.3) Using coffee-script-source (1.2.0) Using execjs (1.3.0) Using coffee-script (2.2.0) Using rack-ssl (1.3.2) Using json (1.6.6) Using rdoc (3.12) Using thor (0.14.6) Using railties (3.2.3) Using coffee-rails (3.2.2) Using jquery-rails (2.0.2) Installing mysql2 (0.3.11) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /Users/rarneson/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb checking for rb_thread_blocking_region()... yes checking for rb_wait_for_single_fd()... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lm... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lz... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lsocket... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lnsl... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lmygcc... no checking for mysql_query() in -lmysqlclient... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/Users/rarneson/.rvm/rubies/ruby-1.9.3-p125/bin/ruby --with-mysql-config --without-mysql-config --with-mysql-dir --without-mysql-dir --with-mysql-include --without-mysql-include=${mysql-dir}/include --with-mysql-lib --without-mysql-lib=${mysql-dir}/lib --with-mysqlclientlib --without-mysqlclientlib --with-mlib --without-mlib --with-mysqlclientlib --without-mysqlclientlib --with-zlib --without-zlib --with-mysqlclientlib --without-mysqlclientlib --with-socketlib --without-socketlib --with-mysqlclientlib --without-mysqlclientlib --with-nsllib --without-nsllib --with-mysqlclientlib --without-mysqlclientlib --with-mygcclib --without-mygcclib --with-mysqlclientlib --without-mysqlclientlib Gem files will remain installed in /Users/rarneson/.rvm/gems/ruby-1.9.3-p125/gems/mysql2-0.3.11 for inspection. Results logged to /Users/rarneson/.rvm/gems/ruby-1.9.3-p125/gems/mysql2-0.3.11/ext/mysql2/gem_make.out An error occured while installing mysql2 (0.3.11), and Bundler cannot continue. Make sure that `gem install mysql2 -v '0.3.11'` succeeds before bundling. I'm running bundle install and this is in my Gemfile: gem 'mysql2', '~> 0.3.11' I've currently got MySQL running through MAMP. I'm not sure if this is a bad idea and I should run a vanilla MySQl but it seems my current problem is just getting the gem installed. I've seen quite a few of these problems here on stackoverflow but all seem a bit different or have really complicated solutions. Is there something I'm missing? Something simple? Something stupid? I can provide additional info from the out file if necessary. I've read that some people use SQLite for dev and test then MySQL in prod but that sounds like a pretty horrible idea.

    Read the article

  • When I zip up my demo FlashDevelop project..why does it break?

    - by Ryan
    I built an AS3 image gallery using FlashDevelop. Before I zip up the application, I can run the image gallery in my browser by simply opening the index.html for the project. Everything works perfectly. I then zip up the project as proj-0.1.2.zip using winrar. I then unzip this newly created zip and try to load the application using the project index.html like above. The gallery doesn't function properly. From seeing what happens, it appears as though the image metadata is not present(but I'm not sure, see below). There are other applications as well that are broken. Videos don't load. If an application doesn't depend on any external assets then everything looks fine. Another thing..If I then build the FlashDevelop project and republish the swf..then it works in the index.html like I want. What is going on here? I want people to be able to fire up my demo apps out of the box by just running the index.html. If that doesn't always work and they have to figure out that they need to rebuild the SWF then that's pretty bad.

    Read the article

  • When opening a file in perl, how can I automatically use STDIN/OUT if the file name is "-"?

    - by Ryan Thompson
    I have a perl program that takes input and output file arguments, and I'd like to support the convention of using "-" to specify standard input/output. The problem is that I can't just open the file name, because open(my $input, '<', '-') opens a file called -, not standard input. So I have to do something like this: my $input_fh; if ($input_filename eq '-') { # Special case: get the stdin handle $input_fh = *STDIN{IO}; } else { # Standard case: open the file open($input_fh, '<', $input_filename); } And similarly for the output file. Is there any way to do this without testing for the special case myself? I know I could hack the ARGV filehandle to do this for input, but that won't work for output.

    Read the article

  • SharePoint Permissions - Repeated Login Boxes

    - by Ryan Smith
    I have a SharePoint site that is locked down through standard Windows permissions. I keep getting an repeated login box prompt, and it appears that it has to do with the Themes images and the CSS style sheets. Where do I need to update permissions so that these files have the same permissions as the rest of the site and the user only needs to login once? Thanks.

    Read the article

  • parsing ip address in php

    - by Ryan
    Hi all, I am trying to create a page that shows the user their zip code when they are on my page. (if any of you are familiar with GeoIP data, thats what I am using. ) I have a conversion that converts the users IP address into an IP number, that conversion is: ipnum = 16777216*w + 65536*x + 256*y + z where w.x.y.z are the ip sections (000.000.000.000) My question is, using $_SERVER['REMOTE_ADDR']; is there a way for me to section the users ip address and assign the section of the ip address to variables? for example: usersip = 192.168.123.5 w = 192; x = 168; y = 123; z = 5; Thanks!

    Read the article

  • Unable to create PDB file

    - by Ryan Smith
    For some reason this error started popping up today on one of my projects. Error 1 Unable to write to output file 'C:\MyProject\Release\MyProject.pdb': Unspecified error If I go into advanced compile options and change it to not generate and debug info, my project compiles fine. I have tried setting the permissions on the Release folder to full for everyone, so I would assume it's not a permissions issue. Also, I don't see anything in my log files that would provide me with more information about the issue. Does anyone know why this error would just start showing up or a way to fix it? Thanks. Update: I have rebooted my machine, restarted VS several times and have even completely deleted the existing OBJ file where the issue is happening. It's still giving me the same error. This is a simple one project solution that was working fine just last week. It appears to be an issue with VS trying to build the PDB file because I can delete them out of the Release and Debug folders without issue. When I try rebuilding them VS will start creating the file (about 1.4MB is size) but I still get the error.

    Read the article

  • Dynamic Variables Within Functions

    - by Ryan
    Why does this work: function myfunction($v) { $query = $v['host'] == '1'; return ( $query ); } $output = array_filter($recordset,myfunction); print_r($output); Whereas this script, which tries to accomplish the same thing with variables, does not? $column1 = 'host'; $value1 = 1; $query1 = '$v[\''.$column1.'\'] == '.$value1; function myfunction($v) { $query = $GLOBALS['query1']; return ( $query ); } $output = array_filter($recordset,myfunction); print_r($output); Any help would be great. Thanks!

    Read the article

  • jQuery image hover color overlay

    - by Ryan Max
    I can't seem to find any examples of this having been done anywhere on the internet before but here is what I am going to attempt to do...I'm trying to go about the cleanest possible way of laying this out. So I have an image gallery where the images are all different sizes. I want to make it so that when you mouseover the image, it turns a shade of orange. Just a simple hover effect. I want to do this without using an image swap, otherwise I'd have to create an orange colored hover-image for each individual gallery image, I'd like this to be a bit more dynamic. My plan is just to position an empty div over the image absolutely with a background color, width and height 100% and opacity: 0. Then using jquery, on mouseover I'd have the opacity fade to 0.3 or so, and fade back to zero on mouseout. My question is, what would be the best way to layout the html and css to do this efficiently and cleanly. Here's a brief, but incomplete setup: <li> <a href="#"> <div class="hover">&nbsp;</div> <img src="images/galerry_image.png" /> </a> </li> .hover { width: 100%; height: 100%; background: orange; opacity: 0; }

    Read the article

  • LINQ to SQL -- Can't modify return type of stored procedure.

    - by Kyle Ryan
    When I drag a particular stored procedure into the VS 2008 dbml designer, it shows up with Return Type set to "none", and it's read only so I can't change it. The designer code shows it as returning an int, and if I change that manually, it just gets undone on the next build. But with another (nearly identical) stored procedure, I can change the return type just fine (from "Auto Generated Type" to what I want.) I've run into this problem on two separate machines. Any idea what's going on? Here's the stored procedure that works: USE [studio] GO /****** Object: StoredProcedure [dbo].[GetCourseAnnouncements] Script Date: 05/29/2009 09:44:51 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER OFF GO CREATE PROCEDURE [dbo].[GetCourseAnnouncements] @course int AS SELECT * FROM Announcements WHERE Announcements.course = @course RETURN And this one doesn't: USE [studio] GO /****** Object: StoredProcedure [dbo].[GetCourseAssignments] Script Date: 05/29/2009 09:45:32 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER OFF GO CREATE PROCEDURE [dbo].[GetCourseAssignments] @course int AS SELECT * FROM Assignments WHERE Assignments.course = @course ORDER BY date_due ASC RETURN

    Read the article

  • Calling SDL/OpenGL from Assembly code on Linux

    - by Lie Ryan
    I'm write a simple graphic-based program in Assembly for learning purpose; for this, I intended to use either OpenGL or SDL. I'm trying to call OpenGL/SDL's function from assembly. The problem is, unlike many assembly and OpenGL/SDL tutorials I found in the internet, the OpenGL/SDL in my machine apparently doesn't use C calling convention. I wrote a simple program in C, compile it to assembly (using -S switch), and apparently the assembly code that is generated by GCC calls the OpenGL/SDL functions by passing parameters in the registers instead of being pushed to the stack. Now, the question is, how do I determine how to pass arguments to these OpenGL/SDL functions? That is, how do I figure out which argument corresponds to which registers? Obviously since GCC can compile C code to call OpenGL/SDL, so therefore there must be a way to figure out the correspondence between function arguments and registers. In C calling conventions, the rule is easy, push parameters backwards and return value in eax/rax, I can simply read their C documentation and I can easily figure out how to pass the parameters. But how about these? Is there a way to call OpenGL/SDL using C calling convention? btw, I'm using yasm, with gcc/ld as the linker on Gentoo Linux amd64.

    Read the article

  • Lookup table size reduction

    - by Ryan
    Hello: I have an application in which I have to store a couple of millions of integers, I have to store them in a Look up table, obviously I cannot store such amount of data in memory and in my requirements I am very limited I have to store the data in an embebedded system so I am very limited in the space, so I would like to ask you about recommended methods that I can use for the reduction of the look up table. I cannot use function approximation such as neural networks, the values needs to be in a table. The range of the integers is not known at the moment. When I say integers I mean a 32 bit value. Basically the idea is use some copmpression method to reduce the amount of memory but without losing many precision. This thing needs to run in hardware so the computation overhead cannot be very high. In my algorithm I have to access to one value of the table do some operations with it and after update the value. In the end what I should have is a function which I pass an index to it and then I get a value, and after I have to use another function to write a value in the table. I found one called tile coding http://www.cs.ualberta.ca/~sutton/book/8/node6.html, this one is based on several look up tables, does anyone know any other method?. Thanks.

    Read the article

  • MySQL query being performed when PHP if condition not met?

    - by Ryan
    The script I'm using is if($profile['username'] == $user['username']) { $db->query("UPDATE users SET newcomments = 0 WHERE username = '$user[username]'"); echo "This is a test"; } (Note that $db-query is exactly the same as mysql_query) For some very odd reason, the MySQL query is being performed even if the defined condition is false The "This is a test" works properly and only appears when the condition is met, but the MySQL query is performed anyway Whats the problem with it?

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >