Daily Archives

Articles indexed Saturday April 17 2010

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

  • Why do values in the row I insert not match the values in the insert query?

    - by user202411
    I just can't understand why is my database (mysql) behaving like this! My console shows that the record is created properly (please, notice the "remote_id" value): Tweet Create (0.3ms) INSERT INTO `tweets` (`remote_id`, `text`, `user_id`, `twitter_account_id`) VALUES (12325438258, 'jamaica', 1, 1) But when I check the record, it shows that the remote_id is 2147483647 intead of the provided value (12325438258 in the example above)... This table has many entries, but this field is always written with 2147483647... It was supposed to fill this space with an unique id (which I guarantee you is being generated properly).

    Read the article

  • Is it possible to prevent just horizontal scrolling when overflow-x is hidden?

    - by Andrew LeClair
    I have a web page that has content which extends past the right edge of the browser window. I set overflow-x: hidden on <body> to turn off the bottom scrollbar, but I can still scroll horizontally with the trackpad, which is not what I want. Is there any way to prevent the browser from scrolling horizontally? As a side note: Safari 4.0.4 only scrolls horizontally sometimes, and the scrolling feels "sticky" and "jumpy," whereas Firefox always smoothly scrolls horizontally.

    Read the article

  • Passing sql results to views hard-codes views to database column names

    - by Galen
    I just realized that i may not be following best practices in regards to the MVC pattern. My issue is that my views "know" information about my database Here's my situation in psuedo code... My controller invokes a method from my model and passes it directly to the view view.records = tableGateway.getRecords() view.display() in my view each records as record print record.name print record.address ... In my view i have record.name and record.address, info that's hard-coded to my database. Is this bad? What other ways around it are there other than iterating over everything in the controller and basically rewriting the records collection. And that just seems silly. Thanks

    Read the article

  • Silverlight 4.0, Visual Studio 2010, .NET 4.0 released

    - by vladimirl
    Technorati Tags: Silverlight OK, now that Silverlight 4.0 finally is out (http://weblogs.asp.net/scottgu/archive/2010/04/15/silverlight-4-released.aspx) its time to learn it. Also VS 2010 and .NET 4.0 released (http://weblogs.asp.net/scottgu/archive/2010/04/12/visual-studio-2010-and-net-4-released.aspx). And remember about Windows Phone! There is more than enough information on the web. One thing that I would like to see from Microsoft is a complete reference example of business application. Personally I like what Nikhil Kothari is doing (check out his Mix 10 session “Developing with WCF RIA Services Quickly and Effectively” and his blog http://www.nikhilk.net/). Also there is Mike Taulty – the best presenter ever - http://mtaulty.com/communityserver/blogs/mike_taultys_blog/default.aspx Currently I’m watching this three part series: 1. What's new in Silverlight 4 Part 1 by Mike Taulty - http://channel9.msdn.com/posts/matthijs/Whats-new-in-Silverlight-4-Part-1-by-Mike-Taulty/ 2. What's new in Silverlight 4: Part 2 by Mike Taulty - http://channel9.msdn.com/posts/matthijs/Whats-new-in-Silverlight-4-Part-2-by-Mike-Taulty/ 3. Silverlight 4 - A Guided Tour of the Managed Extensibility Framework (MEF) - http://channel9.msdn.com/posts/matthijs/Silverlight-4-A-Guided-Tour-of-the-Managed-Extensibility-Framework-MEF/

    Read the article

  • questions about tucan manager

    - by user23950
    I'm new to this application toucan manager. How do I use it to download mediafire files automatically. By just providing the links. I've added the links but it just won't start downloading. I've started with 4 files. But I don't see any progress. Please help. What do I need to setup. I've clicked on start selected but it wont start

    Read the article

  • private home proxy server

    - by Ben
    How do I make a proxy site for a home URL (EX: 192.168.1.190) to bypass the web filter we have set? Don't worry, I am in cahoots with the person that monitors this stuff, so this is for that person. Thanks!

    Read the article

  • Qt: How to autoexpand parents of a new QTreeView item when using a QSortFilterProxyModel

    - by taynaron
    I'm making an app wherein the user can add new data to a QTreeModel at any time. The parent under which it gets placed is automatically expanded to show the new item: self.tree = DiceModel(headers) self.treeView.setModel(self.tree) expand_node = self.tree.addRoll() #addRoll makes a node, adds it, and returns the (parent) note to be expanded self.treeView.expand(expand_node) This works as desired. If I add a QSortFilterProxyModel to the mix: self.tree = DiceModel(headers) self.sort = DiceSort(self.tree) self.treeView.setModel(self.sort) expand_node = self.tree.addRoll() #addRoll makes a node, adds it, and returns the (parent) note to be expanded self.treeView.expand(expand_node) the parent no longer expands. Any idea what I am doing wrong?

    Read the article

  • Exception when programmatically copying content type

    - by BeraCim
    Hi all: I'm getting exceptions when copying content type from one web to another: foreach (SPContentType destinationWebCt in destinationWeb.ContentTypes) { destinationWeb.ContentTypes.Add(existingWebCt); destinationWeb.Update(); } existingWebCt is the content type from another web e.g. /Site/Web. destinationWeb is the web that I wish to copy the content type to e.g. /Site/DestinationWeb. I got the SPException that says something like could not copy content type to scope. Then I decided to replace all "ContentTypes" to "AvailableContentTypes", but then I got the SPException saying this collcetion could not be modified. So how can I copy a content type to another web? Thanks.

    Read the article

  • Virtual dedicated surver repetitive draining RAM, OOM constantly

    - by Deerly
    My linux (fedora red hat 7) virtual dedicated server has been experiencing OOM multiple times a day for the past several days. I thought the issue was with spamd/spamassassin but after disabling this the errors remains. The highest usage displayed on ps faux --cumulative: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 28412 8.7 0.5 309572 109308 ? Sl 22:15 0:17 /usr/java/jdk1. mysql 7716 0.0 0.0 136256 18000 ? Sl 22:12 0:00 _ /usr/libexe named 17697 0.0 0.0 120904 15316 ? Ssl 22:09 0:00 /usr/sbin/named I'm not running any java applications so I'm not sure why the top issue is showing up. It is frustrating as I barely have anything running on the server and use the tiniest fraction of bandwidth. Any help or suggestions on zeroing in on the source of the drain would be much appreciated! Thanks!

    Read the article

  • algorithm to use to return a specific range of nodes in a directed graph

    - by GatesReign
    I have a class Graph with two lists types namely nodes and edges I have a function List<int> GetNodesInRange(Graph graph, int Range) when I get these parameters I need an algorithm that will go through the graph and return the list of nodes only as deep (the level) as the range. The algorithm should be able to accommodate large number of nodes and large ranges. Atop this, should I use a similar function List<int> GetNodesInRange(Graph graph, int Range, int selected) I want to be able to search outwards from it, to the number of nodes outwards (range) specified. So in the first function, I expect it to return the nodes placed in the blue box. The other function, if I pass the nodes as in the graph with a range of 1 and it starts at node 5, I want it to return the list of nodes that satisfy this criteria (placed in the orange box)

    Read the article

  • Swing - how to mix JTextField and JTextAreas and have same visual appearance?

    - by I82Much
    I am using miglayout to create a form in which there are JTextFields (short input answers) as well as JTextAreas (Longer answers). The problem is twofold. The border placed around a Scrollpane wrapped text area does not match that of a Text Field. The width and placement of the textarea/textfield differ, causing them not to line up correctly. Source code: package test2; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JTextField; import net.miginfocom.swing.MigLayout; public class Test extends JPanel { private static final int NUM_CHARACTERS_WIDTH = 20; private static final int NUM_ROWS = 5; public Test() { setLayout(new MigLayout( "wrap 2", // Align text labels on the so their right edge meets left edge of the text fields "[right][left]" )); add(new JLabel("Text field:")); add(new JTextField(NUM_CHARACTERS_WIDTH)); add(new JLabel("No scrollpane text area:")); add(new JTextArea(NUM_ROWS, NUM_CHARACTERS_WIDTH)); add(new JLabel("Scrollpane text area:")); add(new JScrollPane(new JTextArea(NUM_ROWS, NUM_CHARACTERS_WIDTH))); add(new JLabel("Text field:")); add(new JTextField(NUM_CHARACTERS_WIDTH)); } public static void main(String[] args) { JFrame frame = new JFrame(""); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JPanel panel = new Test(); frame.add(panel); frame.pack(); frame.setVisible(true); } } What's the preferred way to mix and match jtextfield and jtextareas, while still maintaining visual harmony? I notice now that the text field has a blue highlight around it when focus is in it, as opposed to the text area... another source of visual discontinuity.

    Read the article

  • fetching a url using $.getJSON and parsing it correctly

    - by sofia
    This is probably really stupid but i can't find the problem with my code. It fetches a url that returns json and the function is then supposed to return a string: function getit() { var ws_url = 'example.com/test.js'; var user = false; $.getJSON(ws_url, function(data) { alert('user '+data.user);//shows john user = data.user || false; } ); return user;//should return john but returns false } test.js will have something like this: {"id":"12","username":"ses","user":"john","error":""} or like this: {"error":"123"} I also tried if(data.user){}else{} but it didn't work either.. So what am i missing? Thanks :)

    Read the article

  • Radio button list asp.net

    - by user192972
    Hai, I have a radio button list control with open,close as list items.I have two columns in my database as Start Bid and End bid both the columns are datetime datatype.If i select the open list items and click search button it should show only bids that are open else viceversa. Please suggest me with example. Regards Basanth

    Read the article

  • Can i create a website blacklist with Group Policy?

    - by jimmygee
    Like i can create "whitelist" functionality for blocking all sites and allowing some via the GP setting: "User Configuration Windows Settings Internet Explorer Maintenance Connection/Proxy Settings Exceptions - Do not use proxy server for addresses beginning with" Can i create also a blacklist option like this (or similar) in Group Policy?

    Read the article

  • How to get a static ip address on adsl

    - by user23950
    I tried it before by setting the ip address manually. And I used this IP Address: 192.168.1.33 I reboot and tried if I can connect to the internet, but no luck. It must be set to obtain your ip address automatically. Is there any way on getting a static ip address on an adsl/dsl

    Read the article

  • Passing arguments to a C program

    - by Radhika
    Hi All, I was writing a C program where I use 6 variables a,b,c,d,e,f a,b,c are constant values which I should pass as an argument(command line) d,e,f are going to be size of arrays(which are a part of a structure) typedef struct { blah blah } ex; ex ex0[d]; I am very confused about how to pass all these as argument. Right now I have hard coded these values,which apparently I should not be doing.

    Read the article

  • multiple records using the select_tag

    - by JZ
    I'm attempting to display multiple records, with each record displaying its own selection box. I would like to submit this form and pass a hash, having the Add.id function as the key of the hash, and the selection box option pass as the information in the hash. How could I fix my code? is this even possible with the select_tag method? <%= form_tag yardsign_adds_path, :method => :post do %> <%= select_tag "support_code[]", options_for_select([[ "1 - Strong Supporter", add.id ], [ "2 - Likely Voter" ], [ "3 - Undecided" ], [ "4 - Likely Opposed" ], [ "5 - Strongly Opposed" ]]) %> <%= submit_tag "Update" %> <% end %> Current terminal output: Started POST "/adds/yardsign" for 127.0.0.1 at 2010-04-17 01:36:03 Processing by AddsController#yardsign as HTML Parameters: {"commit"=>"Update", "authenticity_token"=>"VQ2jVfzHI7pB+87lQa9NWqvUK3zwJWiJE7CwAnIewiw=", "support_code"=>["1", "3 - Undecided", "3 - Undecided"]}

    Read the article

  • ASPX ajax form post help

    - by StealthRT
    Hey all, i have this peice of code that allows a user to select a jpg image, resize it and uploads it to the server driectory. The problem being is that it reloads the aspx page when it saves the image. My question is-is there any way to do this same thing but with ajax so that it doesn't leave the page after submitting it? I've done this pleanty of times with classic asp pages but never with a aspx page. Here is the code for the ASPX page: <%@ Page Trace="False" Language="vb" aspcompat="false" debug="true" validateRequest="false"%> <%@ Import Namespace=System.Drawing %> <%@ Import Namespace=System.Drawing.Imaging %> <%@ Import Namespace=System.Drawing.Text %> <%@ Import Namespace=System %> <%@ Import Namespace=System.IO %> <%@ Import Namespace=System.Web %> <%@ Import Namespace=System.ServiceProcess %> <%@ Import Namespace=Microsoft.Data.Odbc %> <%@ Import Namespace=System.Data.Odbc %> <%@ Import Namespace=MySql.Data.MySqlClient %> <%@ Import Namespace=MySql.Data %> <%@ Import Namespace=System.Drawing.Drawing2D %> <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.ADO" %> <%@ Import Namespace=ADODB %> <SCRIPT LANGUAGE="VBScript" runat="server"> const Lx = 200 const Ly = 60 const upload_dir = "/img/avatar/" const upload_original = "tmpAvatar" const upload_thumb = "thumb" const upload_max_size = 256 dim fileExt dim newWidth, newHeight as integer dim l2 dim fileFld as HTTPPostedFile Dim originalimg As System.Drawing.Image dim msg dim upload_ok as boolean </script> <% Dim theID, theEmail, maleOrFemale theID = Request.QueryString("ID") theEmail = Request.QueryString("eMail") maleOrFemale = Request.QueryString("MF") randomize() upload_ok = false if lcase(Request.ServerVariables("REQUEST_METHOD"))="post" then fileFld = request.files(0) if fileFld.ContentLength > upload_max_size * 1024 then msg = "Sorry, the image must be less than " & upload_max_size & "Kb" else try fileExt = System.IO.Path.GetExtension(fileFld.FileName).ToLower() if fileExt = ".jpg" then originalImg = System.Drawing.Image.FromStream(fileFld.InputStream) if originalImg.Height > Ly then newWidth = Ly * (originalImg.Width / originalImg.Height) newHeight = Ly end if Dim thumb As New Bitmap(newWidth, newHeight) Dim gr_dest As Graphics = Graphics.FromImage(thumb) dim sb = new SolidBrush(System.Drawing.Color.White) gr_dest.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality gr_dest.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality gr_dest.FillRectangle(sb, 0, 0, thumb.Width, thumb.Height) gr_dest.DrawImage(originalImg, 0, 0, thumb.Width, thumb.Height) try originalImg.save(Server.MapPath(upload_dir & upload_original & fileExt), originalImg.rawformat) thumb.save(Server.MapPath(upload_dir & theID & fileExt), originalImg.rawformat) msg = "Uploaded " & fileFld.FileName & " to " & Server.MapPath(upload_dir & upload_original & fileExt) upload_ok = true File.Delete(Server.MapPath(upload_dir & upload_original & fileExt)) catch msg = "Sorry, there was a problem saving your avatar. Please try again." end try if not thumb is nothing then thumb.Dispose() thumb = nothing end if else msg = "That image does not seem to be a JPG. Upload only JPG images." end if catch msg = "That image does not seem to be a JPG." end try end if if not originalImg is nothing then originalImg.Dispose() originalImg = nothing end if end if %><head> <meta http-equiv="pragma" content="no-cache" /> </head> <html> <script type="text/javascript" src="js/jquery-1.3.min.js"></script> <form enctype="multipart/form-data" method="post" runat="server" id="sendImg"> <input type="file" name="upload_file" id="upload_file" style="-moz-opacity: 0; opacity:0; filter: alpha(opacity=0); margin-top: 5px; float:left; cursor:pointer;" onChange="$('#sendImg').submit();" > <input type="submit" value="Upload" style="visibility:hidden; display:none;"> </form> </body> </html> Any help would be great! :o) David

    Read the article

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