Daily Archives

Articles indexed Friday April 9 2010

Page 12/128 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • How to update facebook status by http request

    - by Narjes
    I try to send http request like: ..."POST http://api.facebook.com/restserver.php?method=facebook.users.setStatus&api_key=762ec91e7987aaeaee7e2cdfdfcb3c30&call_id=$call_id&sig=$s&v=1.0&uid=1533439618&status=44 HTTP/1.1";.... but I receive nothing... in twitter I success: .. "POST ht tp://twitter.com/statuses/update.xml?status=123123 HTTP/1.1" ...

    Read the article

  • quick question about memory management in AS3

    - by TheDarkIn1978
    the following method will be called many times. i'm concerned the continuous call for new rectangles will add potentially unnecessary memory consumption, or is the memory used to produce the previous rectangle released/overwritten to accommodate another rectangle since it is assigned to the same instance variable? private function onDrag(evt:MouseEvent):void { this.startDrag(false, dragBounds()); } private function dragBounds():Rectangle { var stagebounds = new Rectangle(0 - swatchRect.x, 0 - swatchRect.y, stage.stageWidth - swatchRect.width, stage.stageHeight - swatchRect.height); return stagebounds; }

    Read the article

  • Byte = 8bits, but why doesn't BitConverter think so

    - by Paul Farry
    Given the following information Public Enum Request As Byte None = 0 Identity = 1 License = 2 End Enum Protected mType As Communication.Request mType = Communication.Request.Identity Debug.Print (BitConverter.GetBytes(mType).Length.tostring) 2 Why does bitconverter report that mType is a length of 2. I would have thought that passing a Byte into BitConverter.GetBytes would just return the Byte. I mean it's no big deal because it's only sending a very small block of data across a TCP Socket, but I'm just intrigued why it thinks it's 2 bytes.

    Read the article

  • How to create an "endless" scrolling slideshow?

    - by Andrew
    I know a good bit of JS and I'm familiar with jQuery, and I'm trying to create an "endless" slideshow (like the one on http://thisismedium.com/), where the images scroll -- one right behind the other -- and when it reaches the end it loops. I don't really know how to start, so I was hoping someone could point me in the right direction. I created a slideshow before that automatically switched images and let you click Next and Previous, but I'm stuck here. =/.

    Read the article

  • Can JavaScript load raw bytes to use in HTML 5 Canvas?

    - by whiskeyspider
    Say I had a file like... http://my.website.com/myfile.raw and this file was just raw bytes, representing an intensity image. Is it possible to grab this data and read the bytes in JavaScript? And then using it with HTML 5 canvas (e.g., putImageData) to draw an image? Or is there some other way to do this in the browser without Java or Flash?

    Read the article

  • ASP.NET MVC - creating and handling with URLs with Greater Than and Less Than characters

    - by pcampbell
    Consider a link to a page for a user's profile. A page is creating that URL like this: //Model.Name has value "<bad guy>" Html.ActionLink("foo, "ViewUser", new { id=5, title=Url.Encode(Model.Name) }) The actual outcome was http://mysite/Users/5/%253cbad%2guy%253e When navigating to that URL, the server generates a HTTP Error 400 - Bad Request. Question: Given that the Model.Name may contain Unicode characters, or characters otherwise illegal in URLs, what's the best way to strip out illegal characters, or otherwise encode them? The problem surfaces when testing out 'interesting' user inputs with < and >, but anything could come from the user, and therefore be put in a URL by way of Model.Name.

    Read the article

  • NHibernate - I have many, but I only want one!

    - by MartinF
    Hello, I have a User which can have many Emails. This is mapped through a List collection (exposed by IEnumerable Emails on the User). For each User one of the Emails will be the Primary one ("Boolean IsPrimary" property on Email). How can I get the primary Email from User without NHibernate loads every email for the User ? I have the following two entities, with a corresponding table for each public class User { public virtual int Id { get; set; } public virtual IEnumerable<Email> Emails { get; set; } // public virtual Email PrimaryEmail { get; set; } - Possible somehow ? } public class Email { public virtual int Id { get; set; } public virtual String Address { get; set; } public virtual Boolean IsPrimary { get; set; } public virtual User User { get; set; } } Can I map a "Email PrimaryEmail" property etc. on the User to the Email which have "IsPrimary=1" set somehow ? Maybe using a Sql Formula ? a View ? a One-To-One relationship ? or another way ? It should be possible to change the primary email to be one of the other emails, so i would like to keep them all in 1 table and just change the IsPrimary property. Using a Sql Formula, is it be possible to keep the "PrimaryEmail" property on the User up-to-date, if I set the IsPrimary property on the current primary email to false, and then afterwards set the PrimaryEmail property to the email which should be the new primary email and set IsPrimary to true ? Will NHibernate track changes on the "old/current" primary Email loaded by the Sql Formula ? What about the 1 level cache and the 2 level cache when using SqlFormula ? I dont know if it could work by using a View ? Then i guess the Email could be mapped like a Component ? Will it work when updating the Email data when loaded from the View ? Is there a better way ? As I have a bi-directional relationship between User and Email I could in many cases of course query the primary Email and then use the "User" property on the Email to get the User (instead of the other way around - going from User to the primary Email) Hope someone can help ?

    Read the article

  • Android animation clipping when going between layouts

    - by Ravedave
    I have a fairly complex layout. I use a relative layout as the root and then inside of it I have a few table views and some further nesting. When I animate an imageview between these layouts my image clips. I have a background on the parent layout and the animation looks like it's going under it. I have set android:clipChildren="false" and android:clipToPadding="false" on all of the layouts. I've also set anim.setZAdjustment(Animation.ZORDER_TOP); on all of my animations. What am I doing wrong?

    Read the article

  • sql-server: how to insert to temporary table?

    - by RedsDevils
    I have one Temporary Table CREATE TABLE #TEMP (TEMP_ID INT IDENTITY(1,1)) And I would like to insert records to that table, How can I?I do as follow: INSERT INTO #TEMP DEFAULT VALUES But sometimes it doesn't work. What it might be?And I would like to know lifetime of temptable in MSSQL. Please Help me! Thanks all!

    Read the article

  • Browser not loading Php pages

    - by ihaveitnow
    Im using a linux machine, and I followed the instructions seen on http://jm2.php.net/manual/en/install.php to setup php, apache and my sql. I did exactly what it said and nothing more, but when I try to open a .php file with firefox or chrome, it downloads...? Im following a tutorial on learning php seen here: http://devzone.zend.com/node/view/id/625 Is there something im not doing or doing wrong? All answers are appreciated.

    Read the article

  • Wait during iPhone UI modification

    - by paul simmons
    Hi, I am making modifications to elements on UI. There is no (extra) thread or any async. calls. However I want to give a slow motion effect, so wait specific time at each step in a for loop. How can I achieve this without blocking the UI?

    Read the article

  • SQLAuthority News Meeting with Allen Bailochan Tuladhar An Unlimited Experience

    Allen TuladharI recently came back from my 9-day trip in Nepal and I must say that this is one of the best trips I had in my lifetime. Allen Bailochan Tuladhar is a wonderful person and an extreme enthusiast for Microsoft Technology. Allen is the Chief Executive Officer of Unlimited Technologies Pvt Ltd., Country Manager [...]...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Styling an Input Field

    - by John
    Hello, How can I give the input field below the characteristics listed below? Characteristics: -Text typed into the field starts in the upper left corner and starts on another line (wraps?) when the right border of the field is reached. -A scroll bar appears if the text is more than what can fit into the field. -The text is in Courier font. Thanks in advance, John echo '<form action="http://www...com/sandbox/comments/comments2.php" method="post"> <input type="hidden" value="'.$_SESSION['loginid'].'" name="uid"> <input type="hidden" value="'.$submissionid.'" name="submissionid"> <input type="hidden" value="'.$submission.'" name="submission"> <label class="addacomment" for="title">Add a comment:</label> <input class="commentsubfield" name="comment" type="comment" id="comment" maxlength="1000"> <div class="commentsubbutton"><input name="submit" type="submit" value="Submit"></div> </form> '; Some relevant CSS: .commentsubfield {margin-left: 30px; margin-top: 30px; width: 390px; height: 90px; border: 1px solid #999999; padding: 5px; }

    Read the article

  • How to use a App.config file in WPF applications?

    - by Edward Tanguay
    I created a App.config file in my WPF application: <?xml version="1.0" encoding="utf-8" ?> <configuration> <appsettings> <add key="xmlDataDirectory" value="c:\testdata"/> </appsettings> </configuration> Then I try to read the value out with this: string xmlDataDirectory = ConfigurationSettings.AppSettings.Get("xmlDataDirectory"); But it says this is obsolete and that I should use ConfigurationManager which I can't find, even searching in the class view. Does anyone know how to use config files like this in WPF?

    Read the article

  • BroadCast Messages to multiple client on the same machine

    - by Christopher Chase
    I need to have a server on one machine that broadcasts a message sever second or so, Kind of like a service discovery. The message needs to be received by multiple client processes that could be on the same machine or different machines. Im using delphi7, with indy 9.0.18 where im stuck is if i should be using UDP or IP MultiCast or if its even possible... Ive managed to get it to work with IP Multi Cast with one client per machine, but even after many trys with different bindings.. max/min ports etc, i cant seem to find a solution.

    Read the article

  • JDBC Bind table in prepared statement

    - by AEIOU
    Can I bind a table name in a Java Prepared Statement? i.e. PreparedStatement pstmt = aConn.prepareStatement("SELECT column FROM ? "); pstmt.setString(1, "MY_TABLE"); Nope, no I can't. New question, anyone know how to delete a question?

    Read the article

  • How to improve Java performance on Informix for Windows

    - by Michal Niklas
    I have problem with performance of Java UDR functions on Informix on Windows. On this server I already have some functions in C and SPL. I chose one function to write it in those 3 languages and I measured performance of this function on test table. Function calculates some kind of checksum so it does not use any db libraries etc. only string and math operations. I observed performance on 30k records with SQL like: select function(txt) from _tmp_perf_test and I changed function to 'function_c, function_spl or function_java. My performance tests showed that C function is the fastest, SPL function is about 5 times slower, where Java is 100 (one hundred!) times slower than C. I checked it few times and 1:100 ratio didn't improve. I changed Java function to simply return length of the string but even this do not help so it looks, that there is general problem with Java function invocation, because there was no difference in time between Java function that calculate checksum and Java function that returns length of the string. I increased JVM_MAX_HEAP_SIZE to 128 and it not helped too. I use IBM Informix Dynamic Server Version 11.50.TC6DE. The same test on Linux server: IBM Informix Dynamic Server Version 11.50.FC6 show more "normal" results, i.e. Java is slower from C and SPL but only 2 to 5 times. What can I do to improve Java performance on Informix server on Windows? More info about Java on servers: c:\Informix\extend\krakatoa\jre\bin>java -version java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build pwi32dev-20081129a (SR9-0 )) IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows Server 2003 x86-32 j9vmwi3223-20081129 (JIT enabled) J9VM - 20081126_26240_lHdSMr JIT - 20081112_1511ifx1_r8 GC - 200811_07) JCL - 20081129 [root@informix11 bin]# ./java -version java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build pxa64devifx-20071025 (SR6b)) IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Linux amd64-64 j9vmxa6423-20071005 (JIT enabled) J9VM - 20071004_14218_LHdSMr JIT - 20070820_1846ifx1_r8 GC - 200708_10) JCL - 20071025

    Read the article

  • Django: reverse lookup URL of feeds?

    - by Santa
    I am having trouble doing a reverse URL lookup for Django-generated feeds. I have the following setup in urls.py: feeds = { 'latest': LatestEntries, } urlpatterns = patterns('', # ... # enable feeds (RSS) url(r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}, name='feeds_view'), ) I have tried using the following template tag: <a href="{% url feeds_view latest %}">RSS feeds</a> But the resulting link is not what want (http://my.domain.com/feeds//). It should be http://my.domain.com/feeds/latest/. For now, I am using a hack to generate the URL for the template: <a href="http://{{ request.META.HTTP_HOST }}/feeds/latest">RSS feeds</a> But, as you can see, it clearly is not DRY. Is there something I am missing?

    Read the article

  • Elgg MySQL: manual user activation?

    - by dde
    How do you manually activate a user? I am stuck. I have a hosted app, but no mail server yet because I am waiting for a domain name to be transferred to a new registrar. Meanwhile, the site is in a preview mode and it works fine, but remember elgg sends an email and requires new users to confirm via email. For now, I just want to manually activate a couple of users (admin, and some other guest).

    Read the article

  • Silverlight -> WCF -> Database -> problem

    - by Billy
    Hi there, I have some silverlight code that calls a WCF service which then uses the Entity Framework to access the database and return records. Everything runs fine but ... when I replace the Entity Framework code with classic ADO.NET code I get an error: The remote server returned an error: NotFound When I call the ADO.NET code directly with a unit test it returns records fine so it's not a problem with the ADO.NEt code I used fiddler and it seems to say that the service cannot be found with a "500" error. i don't think it's anything to do with the service as the only thing I change is the technology to access the database. Anyone know what i'm missing here?

    Read the article

  • Java : method to to print relative pathname?

    - by HH
    I am hesitant just to look at some env.vars and try to replace things with regexes. So is there a ready method to print relative pathnames system-independently? $ echo ~ /u/user $ pwd /u/user/OH/one/src $ echo "Like relative pathnames ~/OH/one/src, not /u/user/OH/one/src."

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >