Search Results

Search found 1485 results on 60 pages for 'dan heyse'.

Page 41/60 | < Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >

  • PHP: Join two separate mysql queries into the same json data object

    - by Dan
    I'm trying to mesh the below mysql query results into a single json object, but not quite sure how to do it properly. //return data $sql_result = mysql_query($sql,$connection) or die ("Fail."); $arr = array(); while($obj = mysql_fetch_object($sql_result)) { $arr[] = $obj; } echo json_encode($arr); //return json //plus the selected options $sql_result2 = mysql_query($sql2,$connection) or die ("Fail."); $arr2 = array(); while($obj2 = mysql_fetch_object($sql_result2)) { $arr2[] = $obj2; } echo json_encode($arr2); //return json Here's the current result: [{"po_number":"test","start_date":"1261116000","end_date":"1262239200","description":"test","taa_required":"0","account_overdue":"1","jobs_id":null,"job_number":null,"companies_id":"4","companies_name":"Primacore Inc."}][{"types_id":"37"},{"types_id":"4"}] Notice how the last section [{"types_id":"37"},{"types_id":"4"}] is placed into a separate chunk under root. I'm wanting it to be nested inside the first branch under a name like, "types". I think my question has more to do with Php array manipulation, but I'm not the best with that. Thank you for any guidance.

    Read the article

  • Can someone explain how this works?

    - by Dan Howard
    Key in the first three digits of your phone number (NOT the Area code...) Multiply by 80 Add 1 Multiply by 250 Add to this the last 4 digits of your phone number Add to this the last 4 digits of your phone number again. Subtract 250 Divide number by 2 Do you recognize the answer??

    Read the article

  • Extract part of HTML in C/Objective-C

    - by Dan
    Hi, I need to extract the detail content of a website while preserve all formatting of the division. The section I wish to extract is: ... <div class="detailContent"><p> <P dir=ltr><STRONG>Hinweis</strong>: Auf ... </p> </div> ... My current solution is to use HTMLParser from libxml2 and xpath to find the nodes and walk through all the nodes to reconstruct this piece of HTML. This is a long an complicated code. I' just wondering if there is an easier solution to extract part of HTML? Thanks.

    Read the article

  • PHP - Get dates of next 5 weekdays?

    - by Dan
    I'm trying to create an array of the next 5 working week days (Monday - Friday, excluding today). I know the working week varies around the world but this is not important for what I am trying to do. So, for example, if today is a Wednesday, I want the dates for Thursday and Friday of the current week and Monday, Tuesday and Wednesday of the following week. I thought this would work: $dates = array(); for ($i = 1; $ < 6; $i ++) { $dates[] = date('Y-m-d', strtotime('+ '.$i.' weekday')); } But for today, it is giving me: Monday 1st Tuesday 2nd Wednesday 3rd Thursday 4th Sunday 7th! Any advice appreciated. Thanks

    Read the article

  • jquery child element as trigger

    - by Dan w
    When "forum-title" is clicked, I want "subtopic-frame" within the parent "forum-topics-head" to expand. There are multiple "forum-topics-head" (with all associated children) on this page. The way I have it now, the "forum-topics-head" is the trigger, but I want the "forum-title" to be the trigger. html: <div class="forum-topic-head"> <div class="forum-title">Forum Title</div> <div class="subtopic-frame"> subtopic 1 subtopic 2 </div> </div>

    Read the article

  • manage.py runserver not working

    - by Dan Appleyard
    I am new to django and python in general, so pardon me for any simple mistakes I may be doing. I am trying to setup my first django project on my local windows vista machine. I have created the project successfully with no problems. The issue I am coming across is when my settings.py has values for my database keys, the manage.py runserver command is failing. If I have values in settings before I run the command, as soon as I run it I get errors. If I have already run the command and the server is running, as soon as I edit the settings file with values, the errors show up in my still open command prompt. The inner most exception seems to "Error loading MySQLdb module: No module named MYSQLdb". If I leave the settings.py blank, the command executes with no problems. Any advice would be greatly appreciated! Thanks

    Read the article

  • want to start programming

    - by Dan
    I really want to learn how to program. A friend suggested I buy vs 2005 or a newer version if I'm serious about it. Is there a cheaper route? I would like to start with c#.

    Read the article

  • Firefox jquery flicker bug problem

    - by Dan
    This is possibly a really silly question but I've stared at this code way too long for it to make sense! I'm having problems with a flicker of the screen in firefox; It is related a filtering script... I have a website that is a one page vertical scroll; with different anchors to define sections and a smooth scroll script to make it pretty... See the example here: http://tiny.cc/7g5mn I've tried everything... Please help me, I'm begging you, my eyes hurt!

    Read the article

  • Is there a way to allow a property of a user control to be modified only during design time?

    - by Dan
    I've looked into the DesignOnly attribute, but that doesn't seem to accomplish what I want*. Basically, I'm looking for some way to indicate that some property of a user control (let's say Text) can be modified during design time -- i.e., from the Windows Forms designer in VS (or presumably from any GUI designer that can be used to modify a Windows Forms GUI) -- but not during run time. Once the application is running, the property should effectively be readonly. Is this possible? * When I add the DesignOnly attribute to a property, the value I select for that property from design mode doesn't seem to stick; the property just ends up being whatever I have it set to by default in code.

    Read the article

  • Global javascript variable not accessible in jquery change event

    - by Dan
    I have to be missing something simple, but I'm really not sure what. I'm not a JS veteran, so this may be an easy answer - sure hope so :). I have a button that, when clicked, gets JSON data. When a drop-down is changed, I check to see if there is data, if there is, I want to clear it out as the drop-down indicates what data to retrieve when the button is clicked The Code: var selected, $locDialog; var locations = []; $(function() { // Save the selected Name selected = $("#selected option:selected").val(); // Setup Dialog for Locations $locDialog = $('#location-dialog').dialog({ autoOpen: false }); // If user changes the selected // 1. Prompt for confirmation // 2. If users confirms, clear data $('#selected').change(function() { if (locations) { var confirmed = confirm("Oh Rly?"); if (confirmed) { // Clear data var locations; } } }); // When user clicks "Location" Button.. $('.loc-select button').click(function() { if (!locations) { $.getJSON("/Controller/JSONAction", { selectedId: selected, pageNum: 1, pageSize: 100 }, function(data) { locations = data; $.each(locations, function(index, loc) { var $tr = $('<tr/>') .append($('<td/>') .append('<input type="checkbox" name="TEST-'+index+'" value="'+loc.Id+'"/>')) .append('<td>' + loc.Name + '</td>'); $("#location-dialog table tbody").append($tr); }); }); } $locDialog.dialog('open'); return false; }); }); Here's the thing, Inside the .click(...) callback, I can see locations is []. Now, when I am in the .change(...) callback, I see locations is undefined. Any help/insight, as always, is appreciated!

    Read the article

  • Windows Azure Table Storage Error when in the cloud

    - by Dan Jones
    hey, I downloaded the simple table storage sample on Cloudy in Seattle blog It works perfect when aimed at local storage but when I change to point to azure storage i get the following error Screenshot (on skydrive) http://cid-00341536d0f91b53.skydrive.live.com/self.aspx/.Public/error.png anyone see this before? thanks guys

    Read the article

  • Database.ExecuteNonQuery does not return

    - by dan-waterbly
    I have a very odd issue. When I execute a specific database stored procedure from C# using SqlCommand.ExecuteNonQuery, my stored procedure is never executed. Furthermore, SQL Profiler does not register the command at all. I do not receive a command timeout, and no exeception is thrown. The weirdest thing is that this code has worked fine over 1,200,000 times, but for this one particular file I am inserting into the database, it just hangs forever. When I kill the application, I receive this error in the event log of the database server: "A fatal error occurued while reading the input stream from the network. The session will be terminated (input error: 64, output error: 0). Which makes me think that the database server is receiving the command, though SQL Profiler says otherwise. I know that the appropiate permissions are set, and that the connection string is right as this piece of code and stored procedure works fine with other files. Below is the code that calls the stored procedure, it may be important to note that the file I am trying to insert is 33.5MB, but I have added more than 10,000 files larger than 500MB, so I do not think the size is the issue: using (SqlConnection sqlconn = new SqlConnection(ConfigurationManager.ConnectionStrings["TheDatabase"].ConnectionString)) using (SqlCommand command = sqlconn.CreateCommand()) { command.CommandText = "Add_File"; command.CommandType = CommandType.StoredProcedure; command.CommandTimeout = 30 //should timeout in 30 seconds, but doesn't... command.Parameters.AddWithValue("@ID", ID).SqlDbType = SqlDbType.BigInt; command.Parameters.AddWithValue("@BinaryData", byteArr).SqlDbType = SqlDbType.VarBinary; command.Parameters.AddWithValue("@FileName", fileName).SqlDbType = SqlDbType.VarChar; sqlconn.Open(); command.ExecuteNonQuery(); } There is no firewall between the server making the call and the database server, and the windows firewalls have been disabled to troubleshoot this issue.

    Read the article

  • Cannot connect to SQL Server from ASP.NET MVC app

    - by Dan Fergus
    I have an ASP.NET MVC app that has on a hosted server for over a year, connecting to SQL Server. I've had to change hosting services, the new one supports MVC 1.0. I've also moved a non MVC ASP app to the same hosting service. Now, MY MVC based app retturnes this error when I try to validate a user login. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) Now, the non-MVC app can access the exact same database and authenticate users just fine. The MVC app, when run from my dev box connects fine. It also run/connects/authenticates without problem when I install and run the site from an internal SQL 2008 server running IIS 7. I, along with the hosting support techs, am at a loss how the exact same connect string works every where except on the hosted server, and only when run from inside an ASP.NET MVC web app. Any ideas would be greatly appreciated.

    Read the article

  • Conditional skin file in ASP.Net Theme based off of browser

    - by Dan Appleyard
    Is there a way to use a skin file in a theme only when a certain browser is used? The theme stays the same, I just want skin A to apply when a certain browser is used, and skin B when another browser is used. I know I can have server-side code to check and then set the SkinId of the control to either or, but is there another, more global way? Thanks

    Read the article

  • jQuery animation if load() returns something different...

    - by Dan LaManna
    setInterval(function() { var prevTopArticle = $("#toparticles table:first").html(); $("#toparticles").load("myurloffeed.com/topfeed", function() { alternateBG(); var newTopArticle = $("#toparticles table:first").html(); if (prevTopArticle!=newTopArticle) { $("#toparticles table:first").effect("highlight", {color:"#faffc4"}, 2000); } }); }, 8000); So it sets the current first table item to a variable, loads the toparticles div with the tables off the url, and if they are different it will perform the highlight effect, however it does the highlight effect anyway, completely unsure why it isn't working.

    Read the article

  • Trouble using South with Django and Heroku

    - by Dan
    I had an existing Django project that I've just added South to. I ran syncdb locally. I ran manage.py schemamigration app_name locally I ran manage.py migrate app_name --fake locally I commit and pushed to heroku master I ran syncdb on heroku I ran manage.py schemamigration app_name on heroku I ran manage.py migrate app_name on heroku I then receive this: $ heroku run python notecard/manage.py migrate notecards Running python notecard/manage.py migrate notecards attached to terminal... up, run.1 Running migrations for notecards: - Migrating forwards to 0005_initial. > notecards:0003_initial Traceback (most recent call last): File "notecard/manage.py", line 14, in <module> execute_manager(settings) File "/app/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager utility.execute() File "/app/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/app/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv self.execute(*args, **options.__dict__) File "/app/lib/python2.7/site-packages/django/core/management/base.py", line 220, in execute output = self.handle(*args, **options) File "/app/lib/python2.7/site-packages/south/management/commands/migrate.py", line 105, in handle ignore_ghosts = ignore_ghosts, File "/app/lib/python2.7/site-packages/south/migration/__init__.py", line 191, in migrate_app success = migrator.migrate_many(target, workplan, database) File "/app/lib/python2.7/site-packages/south/migration/migrators.py", line 221, in migrate_many result = migrator.__class__.migrate_many(migrator, target, migrations, database) File "/app/lib/python2.7/site-packages/south/migration/migrators.py", line 292, in migrate_many result = self.migrate(migration, database) File "/app/lib/python2.7/site-packages/south/migration/migrators.py", line 125, in migrate result = self.run(migration) File "/app/lib/python2.7/site-packages/south/migration/migrators.py", line 99, in run return self.run_migration(migration) File "/app/lib/python2.7/site-packages/south/migration/migrators.py", line 81, in run_migration migration_function() File "/app/lib/python2.7/site-packages/south/migration/migrators.py", line 57, in <lambda> return (lambda: direction(orm)) File "/app/notecard/notecards/migrations/0003_initial.py", line 15, in forwards ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), File "/app/lib/python2.7/site-packages/south/db/generic.py", line 226, in create_table ', '.join([col for col in columns if col]), File "/app/lib/python2.7/site-packages/south/db/generic.py", line 150, in execute cursor.execute(sql, params) File "/app/lib/python2.7/site-packages/django/db/backends/util.py", line 34, in execute return self.cursor.execute(sql, params) File "/app/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute return self.cursor.execute(query, args) django.db.utils.DatabaseError: relation "notecards_semester" already exists I have 3 models. Section, Semester, and Notecards. I've added one field to the Notecards model and I cannot get it added on Heroku. Thank you.

    Read the article

  • Java Applet - ArrayIndexOutOfBoundsException (pt 2)

    - by Dan
    Hi there, I fixed my previous problem. But now when on my tile map... if I try to go 9 tiles to the RIGHT, and on trying to get to the 9th tile.... I will get this error: Exception in thread "AWT-EventQueue-1" java.lang.ArrayIndexOutOfBoundsException: 8 at tileGen.blocked(tileGen.java:125) at tileGen.keyPressed(tileGen.java:58) at java.awt.Component.processKeyEvent(Component.java:6221) at java.awt.Component.processEvent(Component.java:6040) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1850) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:712) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:990) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:855) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:676) at java.awt.Component.dispatchEventImpl(Component.java:4502) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Here is code: http://www.so.pastebin.com/hYkpQf13 I have tried many solutions, all of which have failed. Maybe someone here can I help me? Thank you.

    Read the article

  • Can I configure a strongly typed data set to use nullable values?

    - by Dan Tao
    If I have a strongly typed data table with a column for values of type Int32, and this column allows nulls, then I'll get an exception if I do this for a row where the value is null: int value = row.CustomValue; Instead I need to do this: if (!row.IsCustomValueNull()) { int value = row.CustomValue; // do something with this value } Ideally I would like to be able to do this: int? value = row.CustomValue; Of course I could always write my own method, something like GetCustomValueOrNull; but it'd be preferable if the property auto-generated for the column itself simply returned a nullable. Is this possible?

    Read the article

  • PHP - Pass POST variables with header()?

    - by Dan
    Hi, I'm trying to use the header() function to create a redirect. I would like to display an error message. Currently I'm sending the message as a parameter through the URL, however this makes it look quite ugly. Is there a way to pass this value as a post variable instead? Any advice appreciated. Thanks.

    Read the article

  • How to expose an entity via alternate keys with spring data rest

    - by dan carter
    Spring-data-rest does a great job exposing entities via their primary key for GET, PUT and DELETE etc. operations. /myentityies/123 It also exposes search operations. /myentities/search/byMyOtherKey?myOtherKey=123 In my case the entities have a number of alternate keys. The systems calling us, will know the objects by these IDs, rather than our internal primary key. Is it possible to expose the objects via another URL and have the GET, PUT and DELETE handled by the built-in spring-data-rest controllers? /myentities/myotherkey/456 We'd like to avoid forcing the calling systems to have to make two requests for each update. I've tried playing with @RestResource path value, but there doesn't seem to be a way to add additional paths.

    Read the article

< Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >