Daily Archives

Articles indexed Thursday June 10 2010

Page 9/121 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Add file to Itunes com

    - by mazzzzz
    I saw the post (http://stackoverflow.com/questions/1585878/adding-song-to-itunes-with-c-sdk-api) about this, but following the link couldn't find any solid help.. Could someone point me in the right direction? Thanks, Max

    Read the article

  • Trouble determining proper decoding of a REST response from an ArcGIS REST service using IHttpModule

    - by Ryan Taylor
    First a little background on what I am trying to achieve. I have an application that is utilizing REST services served by ArcGIS Server and IIS7. The REST services return data in one of several different formats. I am requesting a JSON response. I want to be able to modify the response (remove or add parameters) before the response is sent to the client. However, I am having difficulty converting the stream to a string that I can modify. To that end, I have implemented the following code in order to try to inspect the stream. SecureModule.cs using System; using System.Web; namespace SecureModuleTest { public class SecureModule : IHttpModule { public void Init(HttpApplication context) { context.BeginRequest += new EventHandler(OnBeginRequest); } public void Dispose() { } public void OnBeginRequest(object sender, EventArgs e) { HttpApplication application = (HttpApplication) sender; HttpContext context = application.Context; HttpRequest request = context.Request; HttpResponse response = context.Response; response.Filter = new ServicesFilter(response.Filter); } } } ServicesFilter.cs using System; using System.IO; using System.Text; namespace SecureModuleTest { class ServicesFilter : MemoryStream { private readonly Stream _outputStream; private StringBuilder _content; public ServicesFilter(Stream output) { _outputStream = output; _content = new StringBuilder(); } public override void Write(byte[] buffer, int offset, int count) { _content.Append(Encoding.UTF8.GetString(buffer, offset, count)); using (TextWriter textWriter = new StreamWriter(@"C:\temp\content.txt", true)) { textWriter.WriteLine(String.Format("Buffer: {0}", _content.ToString())); textWriter.WriteLine(String.Format("Length: {0}", buffer.Length)); textWriter.WriteLine(String.Format("Offset: {0}", offset)); textWriter.WriteLine(String.Format("Count: {0}", count)); textWriter.WriteLine(""); textWriter.Close(); } // Modify response _outputStream.Write(buffer, offset, count); } } } The module is installed in the /ArcGIS/rest/ virtual directory and is executed via the following GET request. http://localhost/ArcGIS/rest/services/?f=json&pretty=true The web page displays the expected response, however, the text file tells a very different (encoded?) story. Expect Response {"currentVersion" : "10.0", "folders" : [], "services" : [ ] } Text File Contents Buffer: ? ?`I?%&/m?{J?J??t??`$?@??????iG#)?*??eVe]f@????{???{???;?N'????\fdl??J??!????~|?"~?G?u]???'?)??G?????G??7N????W??{?????,??|?OR????q? Length: 4096 Offset: 0 Count: 168 Buffer: ? ?`I?%&/m?{J?J??t??`$?@??????iG#)?*??eVe]f@????{???{???;?N'????\fdl??J??!????~|?"~?G?u]???'?)??G?????G??7N????W??{?????,??|?OR????q?K???!P Length: 4096 Offset: 0 Count: 11 Interestingly, Fiddler depicts a similar picture. Fiddler Request GET http://localhost/ArcGIS/rest/services/?f=json&pretty=true HTTP/1.1 Host: localhost Connection: keep-alive User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.70 Safari/533.4 Referer: http://localhost/ArcGIS/rest/services Cache-Control: no-cache Pragma: no-cache Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 Cookie: a=mWz_JFOusuGPnS3w5xx1BSUuyKGB3YZo92Dy2SUntP2MFWa8MaVq6a4I_IYBLKuefXDZANQMeqvxdGBgQoqTKz__V5EQLHwxmKlUNsaK7do. Fiddler Response - Before Clicking Decode HTTP/1.1 200 OK Content-Type: text/plain;charset=utf-8 Content-Encoding: gzip ETag: 719143506 Server: Microsoft-IIS/7.5 X-Powered-By: ASP.NET Date: Thu, 10 Jun 2010 01:08:43 GMT Content-Length: 179 ????????`I?%&/m?{J?J??t??`$?@??????iG#)?*??eVe]f@????{???{???;?N'????\fdl??J??!????~|?"~?G?u]???'?)??G?????G??7N????W??{?????,??|?OR????q?K???! P??? Fiddler Response - After Clicking Decode HTTP/1.1 200 OK Content-Type: text/plain;charset=utf-8 ETag: 719143506 Server: Microsoft-IIS/7.5 X-Powered-By: ASP.NET Date: Thu, 10 Jun 2010 01:08:43 GMT Content-Length: 80 {"currentVersion" : "10.0", "folders" : [], "services" : [ ] } I think that the problem may be a result of compression and/or chunking of data (this might be why I am receiving two calls to ServicesFilter.Write(...), however, I have not yet been able to solve the issue. How might I decode, unzip, and otherwise convert the byte stream into the string I know it should be for modification by my filter?

    Read the article

  • CORBA Naming Service returns incorrect location of a registered object

    - by dave-keiture
    Hi experts, I have a simple setup with several objects registered at orbd. Remote client initializes connection to the ORB and tries to resolve a reference to the Naming Serice (IDL:omg.org/CosNaming/NamingContextExt:1.0). So far it's all fine - ORB returns giop.iiop.host/giop.iiop.port pair. When reference to the Naming Service is resolved, client tries to resolve_str() one of the registered objects. This time, Naming Service returns completely different pair giop.iiop.host/giop.iiop.port for the object (not the host/port of a Naming Service) - I don't know anything about them. When client tries to call a method on a resolved object, it fails, as the host/port pair is not configured in the firewall. Could you please explain, why it's happening? Thanks in advance!

    Read the article

  • Form won't submit properly in IE

    - by VUELA
    Hi! My simple donation form submits properly except for Internet Explorer. I'm sure it has to do with issues with change() and focus() or blur(), but all my hundreds of attempts so far have failed me. I tried using .click() instead of change() as mentioned in this post:http://stackoverflow.com/questions/208471/getting-jquery-to-recognise-change-in-ie (and elsewhere), but I could not get it to work! ... so I am overlooking something simple perhaps. Any help is greatly appreciated!! Here is the link to the page: http://www.wsda.org/donate HTML FORM: <form id="donationForm" method="post" action="https://wsda.foxycart.com/cart.php" class="foxycart"> <input type="hidden" id="name" name="name" value="Donation" /> <input type="hidden" id="price" name="price" value="10" /> <div class="row"> <label for="price_select">How much would you like to donate?</label> <select id="price_select" name="price_select"> <option value="10">$10</option> <option value="20">$20</option> <option value="50">$50</option> <option value="100">$100</option> <option value="300">$300</option> <option value="0">Other</option> </select> </div> <div class="row" id="custom_amount"> <label for="price_input">Please enter an amount: $</label> <input type="text" id="price_input" name="price_select" value="" /> </div> <input type="submit" id="DonateBtn" value="Submit Donation »" /> </form> JQUERY: // donation form $("#custom_amount").hide(); $("#price_select").change(function(){ if ($("#price_select").val() == "0") { $("#custom_amount").show(); } else { $("#custom_amount").hide(); } $("#price").val($("#price_select").val()); }); $("#price_input").change(function(){ $("#price").val($("#price_input").val()); });

    Read the article

  • WPF: Menu Items only bind command parameters once.

    - by Aran Mulholland
    Ive noticed this a couple of times when using menus with commands, they are not very dynamic, check this out. I am creating a menu from a collection of colours, I use it to colour a column in a datagrid. Anyway when i first bring up the menu (its a context menu) the command parameter binding happens and it binds to the column that the context menu was opened on. However the next time i bring it up it seems wpf caches the menu and it doesnt rebind the command parameter. so i can set the colour only on the initial column that the context menu appeared on. I have got around this situation in the past by making the menu totally dynamic and destroying the collection when the menu closed and forcing a rebuild the next time it opened, i dont like this hack. anyone got a better way? <MenuItem Header="Colour" ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:ResultEditorGrid}}, Path=ColumnColourCollection}" ItemTemplate="{StaticResource colourHeader}" > <MenuItem.Icon> <Image Source="{StaticResource ColumnShowIcon16}" /> </MenuItem.Icon> <MenuItem.ItemContainerStyle> <Style TargetType="MenuItem" BasedOn="{StaticResource systemMenuItemStyle}"> <!--Warning dont change the order of the following two setters otherwise the command parameter gets set after the command fires, not mush use eh?--> <Setter Property="CommandParameter"> <Setter.Value> <MultiBinding> <MultiBinding.Converter> <local:ColumnAndColourMultiConverter/> </MultiBinding.Converter> <Binding RelativeSource="{RelativeSource AncestorType={x:Type DataGridColumnHeader}}" Path="Column"/> <Binding Path="."/> </MultiBinding> </Setter.Value> </Setter> <Setter Property="Command" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:ResultEditorGrid}}, Path=ColourColumnCommand}" /> </Style> </MenuItem.ItemContainerStyle> </MenuItem>

    Read the article

  • jquery json null when using localhost

    - by Eeyore
    I am trying to load json generated by my django app. It works when I save the json output and load it from a static file. However, when I make a call to a server it returns null. JSON {"users": [ { "id": 1, "name": "arnold" }, { "id": 2, "name": "frankie" } ]} Ajax call $.ajax({ url: "http://localhost:8000/json", //vs. json.js dataType: 'json', type: 'get', timeout: 20000, error: function() { alert("error"); }, beforeSend: function() { alert("beforeSend"); }, complete: function() { alert("complete"); }, success: function(data) { alert(data.users[0].name); } }); view.py return HttpResponse(simplejson.dumps(data), content_type = 'application/json; charset=utf8')

    Read the article

  • Jesse Liberty at the Montreal User Group, take 3

    - by pluginbaby
    This is our last attempt to get Jesse Liberty at the Montreal User Group (and there won’t be any take 4 as this is the very last meeting of the season), so we cross fingers that everything will be fine this time! RunAtServer Consulting is the proud sponsor of this event. What: Silverlight 4, MVVM and Test-Driven Development When: June 16, 2010 at 6:15pm. Where: Microsoft Montreal office at 2000 McGill College, 4th floor, Montreal, QC, H3A 3H3. Price: Free for members of the User Group, 5$ for anyone else.

    Read the article

  • TechEd 2010 - New Orleans

    - by gjfox
    We're a little more than half way through TechEd 2010 in New Orleans and I am having a hard time finding interesting breakout sessions to attend.  Laura Chappell has completed all of her sessions, and Andy Malone is almost done.  Laura's sessions on Wireshark have been amazing.  Andy is always entertaining and informative.  I did sit through a session this afternoon on IPv6 that was interesting.  I will spend the final day in the Hands on Labs area working through some PowerShell, and Communication Server 14 labs.  The speakers for two of my breakouts had written interesting books.  I went to the conference bookstore to pick them up and found both to be sold out.  They did offer to ship the books to me with the TechEd 20 percent discount. I'm not real sure who thought it would be a good idea to hold a conference in June in New Orleans.  It has been HUMID.  On top of that TechEd 2011 will be in my hometown, Atlanta.

    Read the article

  • What ports to open for mail server?

    - by radman
    Hi, I have just finished setting up a Postfix mail server on a linux (ubuntu) platform. I have it sending and receiving email and it is not an open relay. It also supports secure smtp and imap. Now this is a pretty beginner question but should I be leaving port 25 open? (since secure smtp is preferred). if so then why? Also what about port 587? Also should I require any authentication on either of these ports? Please excuse my ignorance in this area :P

    Read the article

  • New wxpython controls not displaying until resize

    - by acrosman
    I have created a custom control (based on a panel) in wxPython that provides a list of custom controls on panel within it. The user needs to be able to add rows at will and have those rows displayed. I'm having trouble getting the new controls to actually appear after they are added. I know they are present, because they appear after a resize of the frame, or if I add them before Show() is called on the frame. I've convinced myself it's something basic, but I can't find the mistake. The add function looks like this: def addRow(self, id, reference, page, title, note): newRow = NoteListRow(self.listPanel, id, reference, page, title, note) self.listSizer.Add(newRow, flag=wx.EXPAND | wx.LEFT) self.rows.append(newRow) if len(self.rows) == 1: self.highliteRow(newRow) self.Refresh() self.Update() return newRow I assume I'm missing something about how refresh and update are supposed to behave, so even a good extended reference on those would likely be helpful.

    Read the article

  • How much user data should be required to grant a password reset?

    - by Andrew Heath
    I'm looking to add password-reset functionality to my site and have been browsing the numerous threads discussing various aspects of that issue here on SO. One thing I haven't really seen clarified is how much information to require from the user for confirmation before sending out the reset email. is email alone enough? email + account username? email + account username + some other identifying value all accounts must input? I don't want my site to seem like an old wrinkly nun with a ruler, but I don't want people to be able to abuse the password reset system willy-nilly. Suggestions?

    Read the article

  • c++: use a #define in printf?

    - by John
    I was wanting to use a constant of some kind for the application ID (so I can use it in printf). I had this: #define _APPID_ "Hello World!" And then the simple printf, calling it into %s (string). It put this out: simple.cpp:32: error: cannot convert ‘_IO_FILE*’ to ‘const char*’ for argument ‘1’ to ‘int printf(const char*, ...)’ What would I use to define the application ID to use in printf? I tried: static const char _APPID_[] = "Hello World"` but it didn't work, same error I think.

    Read the article

  • Nhibernate not tracking changes

    - by Lavinski
    I'm using nhibernate and it appears that changes to my new object are not persisted. After creating and saving an object I then modify it and commit the transaction. However none of the modifications are saved. The strange thing is this code was working previously and I have no idea what could cause this. Nothing was changed that's obviously related.. As an attempted work around I saved the object later in the procedure after all the changes where made however I was greeted with an Assertion Failure collection [] was not processed by flush. Any ideas?

    Read the article

  • Using background-attachment:fixed in safari on the ipad

    - by chris_bcn
    I'm looking to recreate an effect similiar to the popular science app. Basically have one big background image and then have HTML/CSS layer on top of that. When the user scrolls the content, then background-position of the image should remain in place, and not scroll. Obviously in a 'regular' browser I would use background-attachment:fixed, but this doesn't seem to work on the ipad. I know position:fixed doesn't work as you might expect according to safari spec - but is there any way of achieving this?

    Read the article

  • How to designing a generic databse whos layout may change over time?

    - by mawg
    Here's a tricky one - how do I programatically create and interrogate a database who's contents I can't really foresee? I am implementing a generic input form system. The user can create PHP forms with a WYSIWYG layout and use them for any purpose he wishes. He can also query the input. So, we have three stages: a form is designed and generated. This is a one-off procedure, although the form can be edited later. This designs the database. someone or several people make use of the form - say for daily sales reports, stock keeping, payroll, etc. Their input to the forms is written to the database. others, maybe management, can query the database and generate reports. Since these forms are generic, I can't predict the database structure - other than to say that it will reflect HTML form fields and consist of a the data input from collection of edit boxes, memos, radio buttons and the like. Questions and remarks: A) how can I best structure the database, in terms of tables and columns? What about primary keys? My first thought was to use the control name to identify each column, then I realized that the user can edit the form and rename, so that maybe "name" becomes "employee" or "wages" becomes ":salary". I am leaning towards a unique number for each. B) how best to key the rows? I was thinking of a timestamp to allow me to query and a column for the row Id from A) C) I have to handle column rename/insert/delete. Foe deletion, I am unsure whether to delete the data from the database. Even if the user is not inputting it from the form any more he may wish to query what was previously entered. Or there may be some legal requirements to retain the data. Any gotchas in column rename/insert/delete? D) For the querying, I can have my PHP interrogate the database to get column names and generate a form with a list where each entry has a database column name, a checkbox to say if it should be used in the query and, based on column type, some selection criteria. That ought to be enough to build searches like "position = 'senior salesman' and salary 50k". E) I probably have to generate some fancy charts - graphs, histograms, pie charts, etc for query results of numerical data over time. I need to find some good FOSS PHP for this. F) What else have I forgotten? This all seems very tricky to me, but I am database n00b - maybe it is simple to you gurus?

    Read the article

  • Dealing with HTTP content in HTTPS pages

    - by El Yobo
    We have a site which is accessed entirely over HTTPS, but sometimes display external content which is HTTP (images from RSS feeds, mainly). The vast majority of our users are also stuck on IE6. I would both of the following Prevent the IE warning message about insecure content Present something useful to users in place of the images that they can't otherwise see; if there was some JS I could run to figure out which images haven't been loaded and replace them with an image of ours instead that would be great. I suspect that the first aim is simply not possible, but the second may be sufficient. A worst case scenario is that I parse the RSS feeds when we import them, grab the images store them locally so that the users can access them that way, but it seems like a lot of pain for reasonably little gain.

    Read the article

  • Validating Login / Changing User settings / Php Mysql

    - by Marcelo
    Hi everyone, my questions are about login, and changing already saved data. (Q1) 'Till now I've only saved input in the tables of the database (registration steps), now I need to check if the input (login steps), are the same of my table in database, in fact I have 3 types of users, then I'll have to check 3 kind of tables. Then if the input data matches with one of those 3 tables I will redirect the user to his specific area. I'm thinking about saved the submitted data $login=$_REQUEST['login']; and $password=$_REQUEST['password']; and compare with the login column in the database. Then if the login matches, I'll compare the password submitted with the one in the row, not in the column. But I don't know how to do this search and comparison,neither what to use. Then if both matches I'll redirect the user. Else I'll send an login error message. (this I know how to do) (Q2) What if need to change an already saved user ? For example to change an email address. My changing user's data web page is exactly the same like the registration user web page. Can I load the already saved options and values of registration (table user for example). Then the user will change whatever he thinks it's necessary, and then when he submits the new information, they would not create a new row in my table, but just be overwritten the old information? How can I do this? Sorry for any mistake in English, and Thanks for the attention.

    Read the article

  • Database Network Latency

    - by Karl
    Hi All, I am currently working on an n-tier system and battling some database performance issues. One area we have been investigating is the latency between the database server and the application server. In our test environment the average ping times between the two boxes is in the region of 0.2ms however on the clients site its more in the region of 8.2 ms. Is that somthing we should be worried about? For your average system what do you guys consider a resonable latency and how would you go about testing/measuring the latency? Karl

    Read the article

  • FTP client to zip before upload and unzip on the server after upload

    - by Ronaldo Junior
    I am always working with some big websites that is annoying to upload given the number of small files. I use Filezilla but am happy to buy some commercial solution if there is one out there that can zip the files before upload and then unzip it after upload. Its a pain to have to manually do that all the time. If someone know of any ftp client or extension for Filezilla or other that would do that... I sent an email to the support for CuteFTP and WSFtp - no answer so far... I know FTP protocol does not allow this command - thats why Im asking for a extension (if anyone know) or a free or commercial FTP client that do the job...

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >