Search Results

Search found 2018 results on 81 pages for 'jason bunting'.

Page 63/81 | < Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >

  • Silverlight Calling an HttpHandler

    - by Jason N. Gaylord
    I have a Silverlight application that I'm trying to get to invoke an HttpHandler by using WebClient. I have the HttpHandler just sending an email that says test when invoked. If I hit it via a browser, I get the email. However, using a WebClient object with a delegate, I can't seem to get it to connect. I'm going to try a plain old WinForms app to test my code out later this evening, but wasn't sure if I was missing something in my Silverlight app. Any ideas?

    Read the article

  • Fun programming languages

    - by Jason Baker
    What are some fun programming languages to learn and work with? I'm asking this for absolutely no practical purpose other than just to learn something new. So, what are some fun languages? I already know Python and C# so those don't count (although Python would probably be the first language I'd recommend). I've spent some time with Ruby, but I don't really see anything that's a whole lot different from Python. (and no, I'm not going to learn Intercal or Brainf*ck before you mention it)

    Read the article

  • DotNetNuke - Module settings disapear on new user control.

    - by jason clark
    Hi, I have a DNN module which renders a user control (view.ascx) All is ok ( I am logged in ) and I get the DNN settings menu. however when I add another control and load it like so: string url = Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "View_Details", "mid=" + ModuleId.ToString()); Response.Redirect(url); I lose the settings link when the new control loads. Any ideas? Is there a property somewhere to turn on settings for the loaded user control?

    Read the article

  • Does anyone know where I can find the code for the carousel.us JavaScript 3D Carousel? Developer's s

    - by Jason Livesay
    Does anyone know where I can find the code for the carousel.us JavaScript 3D Carousel? Developer's site (http://www.piksite.com/carousel.us/) is down. I see it referenced all over in articles and tutorials but so far haven't been able to find the actual code to download except from that site which is just ads now. Client wants that specific thing and it doesn't make sense to code it from scratch. Thanks.

    Read the article

  • Converting Python Script to Vb.NET - Involves Post and Input XML String

    - by Jason Shoulders
    I'm trying to convert a Python Script to Vb.Net. The Python Script appears to accept some XML input data and then takes it to a web URL and does a "POST". I tried some VB.NET code to do it, but I think my approach is off because I got an error back "BadXmlDataErr" plus I can't really format my input XML very well - I'm only doing string and value. The input XML is richer than that. Here is an example of what the XML input data looks like in the Python script: <obj is="MyOrg:realCommand_v1/" > <int name="priority" val="1" /> <real name="value" val="9.5" /> <str name="user" val="MyUserName" /> <reltime name="overrideTime" val="PT60S"/> </obj> Here's the Vb.net code I attempted to convert that: Dim reqparm As New Specialized.NameValueCollection reqparm.Add("priority", "1") reqparm.Add("value", "9.5") reqparm.Add("user", "MyUserName") reqparm.Add("overrideTime", "PT60S") Using client As New Net.WebClient Dim sTheUrl As String = "[My URL]" Dim responsebytes = client.UploadValues(sTheUrl, "POST", MyReqparm) Dim responsebody = (New System.Text.UTF8Encoding).GetString(responsebytes) End Using I feel like I should be doing something else. Can anyone point me to the right direction?

    Read the article

  • Why do new ASP.NET books still refer to "Classic ASP?"

    - by Jason
    I have read several ASP.NET 3.5 and 4.0 books that begin explaining a concept with something like "in classic ASP it would have been done like this." Why do ASP.NET 4.0 books still refer to classic ASP? Are there really that many developers jumping from Classic ASP directly to ASP.NET 4.0 or is it just force of habit?

    Read the article

  • Getting list of states/events from a model that AASM's

    - by Jason Nerer
    Hi, I successfully integrated the most recent AASM gem into an application, using it for the creation of a wizard. In my case I have a model order class Order < ActiveRecord::Base belongs_to :user has_one :billing_plan, :dependent => :destroy named_scope :with_user, ..... <snip> include AASM aasm_column :aasm_state aasm_initial_state :unauthenticated_user aasm_state :unauthenticated_user, :after_exit => [:set_state_completed] aasm_state : <snip> <and following the event definitions> end Now I would like to give an administrator the possibility to create his own graphs through the AASM states. Therefore I created two additional models called OrderFlow and Transition where there order_flow has many transitions and order belongs_to order_flow. No problem so far. Now I would like to give my admin the possibility to dynamically add existing transitions / events to an order_flow graph. The problem now is, that I do not find any possibility to get a list of all events / transitions out of my order model. aasm_states_for_select seems to be the correct candidate, but I cannot call it on my order model. Can anyone help? Thx in advance. J.

    Read the article

  • Easyslider content loading sooner than I would like.

    - by Jason
    I am using a jquery easyslider on a page and also pulling some rss feeds using php. Pulling the feeds is taking a long time and as a result delaying the load of the easy slider until after the feeds have been pulled in. This can be seen here: http://perksconsulting.com/dev/ I am looking for a way to display a loader image in the space where the easy slider is so the images do not appear stacked vertically for a few seconds while the php is interpreted by the server, but I have never used a loader image and am not sure how I would do that. I am currently using this script to hide the page contents until everything is loaded, but the one thing it is not hiding is the images from the easy slider: <SCRIPT TYPE="text/javascript" LANGUAGE="javascript"> function waitPreloadPage() { //DOM if (document.getElementById){ document.getElementById('prepage').style.visibility='hidden'; }else{ if (document.layers){ //NS4 document.prepage.visibility = 'hidden'; } else { //IE4 document.all.prepage.style.visibility = 'hidden'; } } } // End --> </SCRIPT> Ideally I would like to be able to display a loading image in place of the slider in the middle of the page until everything loads. Could anyone tell me how to do this? Thank you.

    Read the article

  • PHP Sessions and Passing Session ID

    - by Jason McCreary
    I have an API where I am passing the session id back and forth between calls. I set up the session like so: // start API session session_name('apikey'); session_id($data['apikey']); // required to link session session_start(); Although I named my session and am passing the session id via GET and POST using the name, PHP does not automatically resume that session. It always creates a new one unless I set the explicitly set the session id. I found some old user comments on www.php.net that said unless the session id is the first parameter PHP won't set it automatically. This seems odd, but even when I call tried it still didn't work: rest_services.php?apikey=sdr6d3subaofcav53cpf71j4v3&q=testing I have used PHP for years, but am a little confused on why I needed to explicitly set the session with session_id() when I am naming the session and passing it's key accordingly. UPDATE It seems I wasn't clear. My question is why is setting the session ID with session_id() required when I am passing the id, using the session name apikey, via $_GET or $_POST. Theoretically this is no different than PHP's SID when cookies are disabled. But for me it doesn't work unless I explicitly set the session ID. Why?

    Read the article

  • Unit testing code which uses Umbraco v4 API

    - by Jason Evans
    I'm trying to write a suite of integration tests, where I have custom code which uses the Umbraco API. The Umbraco database lives in a SQL Server CE 4.0 database (*.sdf file) and I've managed to get that association working fine. My problem looks to be dependancies in the Umbraco code. For example, I would like to create a new user for my tests, so I try: var user = User.MakeNew("developer", "developer", "mypassword", "[email protected]", adminUserType); Now as you can see, I have pass a user type which is an object. I've tried two separate ways to create the user type, both of which fail due to a null object exception: var adminUserType = UserType.GetUserType(1); var adminUserType2 = new UserType(1); The problem is that in each case the UserType code calls it's Cache method which uses the HttpRuntime class, which naturally is null. My question is this: Can someone suggest a way of writing integration tests against Umbraco code? Will I have to end up using a mocking framework such as TypeMock or JustMock?

    Read the article

  • Is it bad to use a model directly from a view in codeigniter?

    - by jason
    I know normally the data is passed thru to the view with the controller. however, currently in my view I load my model ($this-load-model('Db_model');) so i can use it in a loop to retrieve a users profile picture path from a array of IDs that is passed from controller. Will loading the db model in the view to accomplish this make my site more vulnerable or bad form? To me it seems to be outside of MVC concept but its working atm. thanks

    Read the article

  • Still Confused About Identifying vs. Non-Identifying Relationships

    - by Jason
    So, I've been reading up on identifying vs. non-identifying relationships in my database design, and a number of the answers on SO seem contradicting to me. Here are the two questions I am looking at: What's the Difference Between Identifying and Non-Identifying Relationships Trouble Deciding on Identifying or Non-Identifying Relationship Looking at the top answers from each question, I appear to get two different ideas of what an identifying relationship is. The first question's response says that an identifying relationship "describes a situation in which the existence of a row in the child table depends on a row in the parent table." An example of this that is given is, "An author can write many books (1-to-n relationship), but a book cannot exist without an author." That makes sense to me. However, when I read the response to question two, I get confused as it says, "if a child identifies its parent, it is an identifying relationship." The answer then goes on to give examples such as SSN (is identifying of a Person), but an address is not (because many people can live at an address). To me, this sounds more like a case of the decision between primary key and non-primary key. My own gut feeling (and additional research on other sites) points to the first question and its response being correct. However, I wanted to verify before I continued forward as I don't want to learn something wrong as I am working to understand database design. Thanks in advance.

    Read the article

  • Best ASP.NET Background Service Implementation

    - by Jason N. Gaylord
    What's the best implementation for more than one background service in an ASP.NET application? Timer Callback Timer timer = new Timer(new TimerCallback(MyWorkCallback), HttpContext, 5000, 5000); Thread or ThreadPool Thread thread = new Thread(Work); thread.IsBackground = true; thread.Start(); BackgroundWorker BackgroundWorker worker = new BackgroundWorker(); worker.DoWork += new DoWorkEventHandler(DoMyWork); worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(DoMyWork_Completed); worker.RunWorkerAsync(); Caching like http://www.codeproject.com/KB/aspnet/ASPNETService.aspx (located in Jeff Atwood's post here) I need to run multiple background "services" at a given time. One service may run every 5 minutes where another may be once a day. It will never be more than 10 services running at a time.

    Read the article

  • Optimizing Dijkstra for dense graph?

    - by Jason
    Is there another way to calculate the shortest path for a near complete graph other than Dijkstra? I have about 8,000 nodes and about 18 million edges. I've gone through the thread "a to b on map" and decided to use Dijkstra. I wrote my script in Perl using the Boost::Graph library. But the result isn't what I expected. It took about 10+ minutes to calculate one shortest path using the call $graph-dijkstra_shortest_path($start_node,$end_node); I understand there are a lot of edges and it may be the reason behind the slow running time. Am I dead in the water? Is there any other way to speed this up?

    Read the article

  • Hibernate does not allow an embedded object with an int field to be null?

    - by Jason Novak
    Hibernate does not allow me to persist an object that contains an null embedded object with an integer field. For example, if I have a class called Thing that looks like this @Entity public class Thing { @Id public String id; public Part part; } where Part is an embeddable class that looks like this @Embeddable public class Part { public String a; public int b; } then trying to persist a Thing object with a null Part causes Hibernate to throw an Exception. In particular, this code Thing th = new Thing(); th.id = "thing.1"; th.part = null; session.saveOrUpdate(th); causes Hibernate to throw this Exception org.hibernate.PropertyValueException: not-null property references a null or transient value: com.ace.moab.api.jobs.Thing.part My guess is that this is happening because Part is an embedded class and so Part.a and Part.b are simply columns in the Thing database table. Since the Thing.part is null Hibernate wants to set the Part.a and Part.b column values to null for the row for thing.1. However, Part.b is an integer and Hibernate will not allow integer columns in the database to be null. This is what causes the Exception, right? So I am looking for workarounds for this problem. I noticed making Part.b an Integer instead of an int seems to work, but for reasons I won't bore you with this is not a good option for us. Thanks!

    Read the article

  • webscraper grabbing images, but not entering info into database

    - by Jason
    Hello, again. I'm having more issues with my script entering info into my database. The script below grabs a page, strips down the necessary info, then downloads the related image file. After that, it is supposed to enter the information gleaned from the URL into the database. For some reason, the script seems to iterate through the URLs, as I get downloaded images for each URL, but each URL's product is not entered into the database. The script will insert the first product's categories and product info, and then it just stops, and continues to download images. Any suggestions? <?php define('IN_PHPBB', true); $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($phpbb_root_path . 'common.' . $phpEx); include($phpbb_root_path . 'includes/simple_html_dom.' . $phpEx); // Start session management $user->session_begin(); $auth->acl($user->data); $user->setup(); set_time_limit(259200); function save($in, $out) { $ch = curl_init ($in); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_BINARYTRANSFER,1); $rawdata=curl_exec($ch); curl_close ($ch); if(file_exists($out)) { unlink($out); } $fp = fopen($out,'x'); fwrite($fp, $rawdata); fclose($fp); } function scrape($i) { $url = 'http:/xxxxxxxx/index.php?main_page=product_info&products_id='.$i.'&zenid=e4b7dde8de02e1df005d4549e2e3e529'; echo "$url -- "; $exists = file_get_contents($url); if ($exists != false) { $html = file_get_html($url); foreach($html->find('body') as $html) { $test = $html->find('#productName', 0); if ($test) { $item['title'] = trim($html->find('#productName', 0)->plaintext); $item['price'] = trim($html->find('#productPrices', 0)->plaintext); $item['cat'] = $html->find('#navBreadCrumb', 0)->plaintext; list($home, $item['cat'], $item['subcat'], $title) = explode("::", $item['cat']); $item['cat'] = str_replace("&nbsp;", "", $item['cat']); $item['subcat'] = str_replace("\n", "", str_replace("&nbsp;", "", $item['subcat'])); $item['desc'] = trim($html->find('#productDescription', 0)->plaintext); $item['model'] = $html->find('ul#productDetailsList', 0)->find('li', 0)->plaintext; $item['model'] = explode(":", $item['model']); $item['model'] = trim($item['model'][1]); $item['manufacturer'] = $html->find('ul#productDetailsList', 0)->find('li', 1)->plaintext; $item['manufacturer'] = explode(":", $item['manufacturer']); $item['manufacturer'] = trim($item['manufacturer'][1]); foreach($html->find('img') as $img) { if($img->alt == $item['title']) { $item['img_sm'] = $img->src; } } $ret[] = $item; } } $html->clear(); unset($html); unset($item); return $ret; } else { echo "Could not find page<br />"; } unset($exists); } $i = 1; $end = 9999999; while($i < $end) { $ret = scrape($i); if(isset($ret)) { foreach($ret as $v) { $item['title'] = $v['title']; $item['price'] = $v['price']; $item['desc'] = $v['desc']; $item['model'] = $v['model']; $item['manufacturer'] = $v['manufacturer']; $item['image'] = $v['image']; $item['cat'] = $v['cat']; $item['subcat'] = $v['subcat']; $item['img_sm'] = $v['img_sm']; } unset($ret); unset($v); $sm_img_src = "http://xxxxxx/".$item['img_sm']; $ext = strrchr($item['img_sm'], '.'); $filename = $item['model'] . $ext; $lg_img_src = "http://xxxxx/images/STC/".$filename; $new_sm = "./rip_images/small/{$filename}"; $new_lg = "./rip_images/large/{$filename}"; $item['image'] = $filename; save($lg_img_src,$new_lg); save($sm_img_src,$new_sm); //see if parent cat exists $sql = 'SELECT cat_id FROM ' . SHOP_CAT_TABLE . ' WHERE cat_name = "'.$db->sql_escape($item['cat']).'"'; $result = $db->sql_query($sql); $parent = $db->sql_fetchrow($result); $db->sql_freeresult($result); // if not exists if($parent['cat_id'] == '') { //add the parent cat to the db $sql_ary = array( 'cat_name' => $item['cat'], 'cat_parent' => 0 ); $sql = 'INSERT INTO '.SHOP_CAT_TABLE.' '.$db->sql_build_array('INSERT', $sql_ary); $db->sql_query($sql); $cat_id = $db->sql_nextid(); //see if subcat exists $sql = 'SELECT cat_id FROM ' . SHOP_CAT_TABLE . ' WHERE cat_name = "'.$db->sql_escape($item['subcat']).'"'; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); // if not exists if($row['cat_id'] == '') { //add subcat to db $sql_ary = array( 'cat_name' => $db->sql_escape($item['subcat']), 'cat_parent' => $cat_id ); $sql = 'INSERT INTO '.SHOP_CAT_TABLE.' '.$db->sql_build_array('INSERT', $sql_ary); $db->sql_query($sql); $item_cat = $db->sql_nextid(); } else //if exists { $item_cat = $row['cat_id']; } } else //if parent cat exists { //see if subcat exists $sql = 'SELECT cat_id FROM ' . SHOP_CAT_TABLE . ' WHERE cat_name = "'.$db->sql_escape($item['subcat']).'"'; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); // if not exists if($row['cat_id'] == '') { //add the subcat to the db $sql_ary = array( 'cat_name' => $db->sql_escape($item['subcat']), 'cat_parent' => $parent['cat_id'] ); $sql = 'INSERT INTO '.SHOP_CAT_TABLE.' '.$db->sql_build_array('INSERT', $sql_ary); $db->sql_query($sql); $item_cat = $db->sql_nextid(); } else //if exists { $item_cat = $row['cat_id']; } } $sql_ary = array( 'item_title' => $db->sql_escape($item['title']), 'item_price' => $db->sql_escape($item['price']), 'item_desc' => $db->sql_escape($item['desc']), 'item_model' => $db->sql_escape($item['model']), 'item_manufacturer' => $db->sql_escape($item['manufacturer']), 'item_image' => $db->sql_escape($item['image']), 'item_cat' => $db->sql_escape($item_cat) ); $sql = 'INSERT INTO ' . SHOP_ITEM_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary); $db->sql_query($sql); garbage_collection(); echo 'Done<br />'; } $i++; unset($item); } ?>

    Read the article

  • jQuery multiple selectors into dynamic attribute

    - by Jason Fletcher
    I am trying to attach an event to a separate onhover trigger. But I am having problems using multiple selectors since its dynamic. Need help ::: Upon hovering on the yellow box named 'Rings', this should trigger the animated slide event for the green box above it. http://home.jasonfletcher.info/all/alliteration/index.html $('.boxgrid1').hover(function(){ $(".cover", this).stop().animate({top:'0px'},{queue:false,duration:300}); }, function() { $(".cover", this).stop().animate({top:'247px'},{queue:false,duration:300}); });

    Read the article

  • Textview not able to move up when begin editing

    - by Jason lau
    I am having problem moving up my UITextview at the bottom. The UITextField is working properly but the UITextView is not working. Here is my code when press the TextView it pop up the toolbar. Please help - (IBAction)HideKeyboard:(id)sender { [self.myTextField resignFirstResponder]; [self.myTextView resignFirstResponder]; [self.myScrollView setContentOffset:CGPointZero animated:YES]; }

    Read the article

  • Find the right parameters for an event without using Design Mode in Visual Studio 2010

    - by Jason
    Is there a way to know what parameters are needed by an event in Visual Studio 2010? Let's say I have a DropDownList control and I want to bind a method to the "OnSelectedIndexChanged", I would do something like this In the ASPX File: <asp:DropDownList ID="lstMyList" runat="server" OnSelectedIndexChanged="lstMyList_SelectedIndexChanged"></asp:DropDownList> In the codebehind: protected void lstMyList_SelectedIndexChanged(object sender, EventArgs e) { ... } Is there a way to know what parameters the method needs? (In this case, an object for the sender and an EventArgs parameter for the event.) I know you can easily create the method by double-clicking the right event in Design Mode, but it does a mess with your code so I prefer not to use it. Thanks!

    Read the article

  • How to properly encode "[" and "]" in queries using Apache HttpClient?

    - by Jason Nichols
    I've got a GET method that looks like the following: GetMethod method = new GetMethod("http://host/path/?key=[\"item\",\"item\"]"); Such a path works just fine when typed directly into a browser, but the above line when run causes an IllegalArgumentException : Invalid URI. I've looked at using the URIUtils class, but without success. Is there a way to automatically encode this (or to add a query string onto the URL without causing HttpClient to barf?).

    Read the article

  • Inline Conditional Statement in Stored Procedure

    - by Jason
    Here is the pseudo-code for my inline query in my code: select columnOne from myTable where columnOne = '#variableOne#' if len(variableTwo) gt 0 and columnTwo = '#variableTwo#' end I would like to move this into a stored procedure but am having trouble building the query correctly. I assume it would be something like select columnOne from myTable where columnOne = @variableOne CASE WHEN len(@variableTwo) <> 0 THEN and columnTwo = @variableTwo END This is giving me a syntax error. Could someone tell me what I've got wrong. Also, I would like to keep it to only one query and not just have one if statement. Also, I do not want to build the sql in the stored procedure and run Exec() on it.

    Read the article

  • How do you position a wx.MessageDialog (wxPython)?

    - by Jason
    Hi: Is there any reason why the position, pos, flag doesn't seem to work in the following example? dlg = wx.MessageDialog( parent=self, message='You must enter a URL', caption='Error', style=wx.OK | wx.ICON_ERROR | wx.STAY_ON_TOP, pos=(200,200) ) dlg.ShowModal() dlg.Destroy() The documentation is here: http://www.wxpython.org/docs/api/wx.MessageDialog-class.html 'self' is a reference to the frame. I'm running in Windows Vista, python26, wxpython28. The message dialog always appears to be in the middle of the screen. If for some reason it's not possible to position the dialog, is there anyway to at least restrict the dialog to be in the frame, rather than just the center of the screen? thanks!

    Read the article

  • shell script filter du and find by a string inside a file in a subfolder

    - by Jason
    I have the following command that I run on cygwin: find /cygdrive/d/tmp/* -maxdepth 0 -mtime -150 -type d | xargs du --max-depth=0 > foldersizesreport.csv I intended to do the following with this command: for each folder under /d/tmp/ that was modified in last 150 days, check its total size including files within it and report it to file foldersizesreport.csv however that is now not good enough for me, as it turns out inside each /d/tmp/subfolder1/somefile.properties /d/tmp/subfolder2/somefile.properties /d/tmp/subfolder3/somefile.properties /d/tmp/subfolder4/somefile.properties so as you see inside each subfolderX there is a file named somefile.properties inside it there is a property SOMEPROPKEY=3808612800100 (among other properties) this is the time in millisecond, i need to change the command so that instead of -mtime -150 it will include in the whole calculation only subfolderX that has a file inside them somefile.properties where the SOMEPROPKEY=3808612800100 is the time in millisecond in future, if the value SOMEPROPKEY=23948948 is in past then dont at all include the folder in the foldersizesreport.csv because its not relevant to me. so the result report should be looking like: /d/tmp/,subfolder1,<itssizein KB> /d/tmp/,subfolder2,<itssizein KB> and if subfolder3 had a SOMEPROPKEY=34243234 (time in ms in past) then it would not be in that csv file. so basically I'm looking for: find /cygdrive/d/tmp/* -maxdepth 0 -mtime -150 -type d | <only subfolders that have in them property in file SOMEPROPKEY=28374874827 - time in ms in future and not in past | xargs du --max-depth=0 > foldersizesreport.csv

    Read the article

< Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >