Daily Archives

Articles indexed Thursday April 1 2010

Page 26/126 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • Android HTTP Connection

    - by Ubersoldat
    Can anybody tell my why this doesn't work in the Android emulator? From the browser I have access and the server is internal. All I can think of is that I'm missing some configuration on my app so it can access the network layer. try { InetAddress server = Inet4Address.getByName("thehost"); //Doesn't work either //or InetAddress server2 = Inet4Address.getByAddress(new String("192.168.1.30").getBytes()); if(server.isReachable(5000)){ Log.d(TAG, "Ping!"); } Socket clientsocket = new Socket(server, 8080); } catch (UnknownHostException e) { Log.e(TAG, "Server Not Found"); } catch (IOException e) { Log.e(TAG, "Couldn't open socket"); } Throws an UnknownHostException Thanks

    Read the article

  • Extending WCF Data Service to synthesize missing data on request

    - by Schneider
    I have got a WCF Data Service based on a LINQ to SQL data provider. I am making a query "get me all the records between two dates". The problem is that I want to synthesize two extra records such that I always get records that fall on the start and end dates, plus all the ones in between which come from the database. Is there a way to "intercept" the request so I can synthesize these records and return them to the client? Thanks

    Read the article

  • Is there a jquery plugin for table paginnation and sorting support via ajax call?

    - by Ethan
    I am looking for a jquery plugin for table paginnation and sorting (and search/filtering hopefully). Datasource could be obtained locally or via ajax call. Hopefully comes with most of the features of this script: http://www.leigeber.com/2009/11/advanced-javascript-table-sorter/ Here is the demo of this script: http://sandbox.leigeber.com/tinytablev3/index.html The problem with this script is that it only support local datasource.

    Read the article

  • version control + continuous integration with Flex + Ruby or Django

    - by user306584
    trying to pick version control, continuous integration, and host for Flex + Ruby or Django smallish project. Question: version control: I've used SVN and CVS in the past. I hear great things about git. Not sure what to pick. continuous integration: I've heard good things about hudson and cruiseControl. Not sure what to pick hosting: is my own server the only way to go? Are the decent cloud options that are not too expensive? or should I look for some free hosting service? thank you for your help! f

    Read the article

  • Prolog: permutations check and multiple answers

    - by Adrian
    Continuing to learn prolog, I'm trying to write a permutation(L1, L2) predicate. It should return true, only if L1 can be made up of all elements in L2. My code so far is the following: permutation([], []). permutation([H|T], L2) :- remove(L2, H, R), permutation(T, R). Assuming that the predicate remove(L1, X, R) functions correctly, and it removes X from L1, I do not get correct results: ?- permutation([1],[1]). true ; false. ?- permutation([1, 2],[1]). true ; false. ?- permutation([1, 2],[1, 2]). true ; false. ?- permutation([1],[1, 2]). false. What am I missing. Subquestion: What happens when the remove predicate returns two answers? My implementation returns the new, correct list, and then after pressing ; it returns the original list. Which answer does permutation predicate use? ?- remove([1,2,3], 3, R). R = [1, 2] ; R = [1, 2, 3].

    Read the article

  • Delete the pendrive contents and also trash in Mac OS X?

    - by Warrior
    I am using a MacBook Pro. I copied some data from my pen drive to my Mac and deleted the content by moving it to trash. After that when I see the info of pen drive it give more value than the original value. If I cleaned the content of the trash only I am able to see the correct value of pen drive and able to copy data. Has Mac been designed like that or is there some other way to delete other than using the "move to trash" option? Thanks.

    Read the article

  • a class function with if(this==NULL) test got compiled?

    - by James
    I saw this code snippet during our lab and it actually compiles in MSVC2008 and G++. void LinkList< class T ::Insert(T n) { if (this == NULL) // some code here } As far as I know the this must not be null since you cannot call a class functions in c++ if it wasn't instantiated. Is this a valid code? if so what's the reason behind and where it can be useful?

    Read the article

  • How to embed html table into the bpdy of email

    - by Michael Mao
    Hi all: I am sending info to target email via PHP native mail() method right now. Everything else works fine but the table part troubles me the most. See sample output : Dear Michael Mao : Thank you for purchasing flight tickets with us, here is your receipt : Your tickets will be delivered by mail to the following address : Street Address 1 : sdfsdafsadf sdf Street Address 2 : N/A City : Sydney State : nsw Postcode : 2 Country : Australia Credit Card Number : *************1234 Your purchase details are recorded as : <table><tr><th class="delete">del?</th><th class="from_city">from</th><th class="to_city">to</th><th class="quantity">qty</th><th class="price">unit price</th><th class="price">total price</th></tr><tr class="evenrow" id="Sydney-Lima"><td><input name="isDeleting" type="checkbox"></td><td>Sydney</td><td>Lima</td><td>1</td><td>1030.00</td><td>1030</td></tr><tr class="oddrow" id="Sydney-Perth"><td><input name="isDeleting" type="checkbox"></td><td>Sydney</td><td>Perth</td><td>3</td><td>340.00</td><td>1020</td></tr><tr class="totalprice"><td colspan="5">Grand Total Price</td><td id="grandtotal">2050</td></tr></table> The source of table is directly taken from a webpage, exactly as the same. However, Gmail, Hotmail and most of other emails will ignore to render this as a table. So I am wondering, without using Outlook or other email sending agent software, how could I craft a embedded table for the PHP mail() method to send? Current code snippet corresponds to table generation : $purchaseinfo = $_POST["purchaseinfo"]; //if html tags are not to be filtered in the body of email $stringBuilder .= "<table>" .stripslashes($purchaseinfo) ."</table>"; //must send json response back to caller ajax request if(mail($email, 'Your purchase information on www.hardlyworldtravel.com', $emailbody, $headers)) echo json_encode(array("feedback"=>"successful")); else echo json_encode(array("feedback"=>"error")); Any hints and suggestions are welcomed, thanks a lot in advance.

    Read the article

  • Best Method to SFTP or FTPS Files via SSIS

    - by Registered User
    What is the best method using SSIS (SQL Server Integration Services) to upload a file to either a remote SFTP (secure FTP with SSH2 protocal) or FTPS (FTP over SSL) site? I've used the following methods, but each has short-comings I would like to avoid: COZYROC LIBRARY Method: Install the CozyRoc library on each development and production server and use the SFTP task to upload the files. Pros: Easy to use. It looks, smells, and feels like a normal SSIS task. SSIS also recognizes the password as sensitive information and allows you all the normal options for protecting the sensitive information instead of just storing it in clear text in a non-secure manner. Works well with other SSIS tasks such as ForEach Loop Containers. Errors out when uploads and downloads fail. Works well when you don't know the names of the files on the remote FTP site to download or when you won't know the name of the file to upload until run-time. Cons: Costs money to license in a production environment. Makes you dependent upon the vendor to update their libraries between each version. Although they already have a 2008 version, this caused me a problem during the CTP's of 2008. Requires installing the libraries on each development and production machine. COMMAND LINE SFTP PROGRAM Method: Install a free command-line SFTP application such as Putty and execute it either by running a batch file or operating system process task. Pros: Free, free, and free. You can be sure it is secure if you are using Putty since numerous GUI FTP clients appear to use Putty under the covers. You DEFINATELY know you are using SSH2 and not SSH. Cons: The two command-line utilities I tried (Putty and Cygwin) required storing the SFTP password in a non-secure location. I haven't found a good way to capture failures or errors when uploading files. The process doesn't look and smell like SSIS. Most of the code is encapsulated in text files instead of SSIS itself. Difficult to use if you don't know the exact name of the file you are uploading or downloading. A 3RD PARTY C# or VB.NET LIBRARY Method: Install a SFTP or FTPS library and use a Script Task that references the library to upload the files. (I've never tried this, so I'm going to guess at the pros and cons) Pros: Probably easy to capture errors. Should work well with variables, so it would probably be easy to use even when you don't know the exact name of the file you are uploading or downloading. Cons: It's a script task combined with .NET libraries. If you are using SSIS, then you probably are more comfortable with SSIS tasks then .NET code. Script tasks are also difficult to troubleshoot since they don't have the same debugging tools and features as regular .NET projects. Creates a dependency on 3rd party code that may not work between different versions of SQL Server. To be fair, it is probably MORE likely to work between different versions of SQL Server than a 3rd party SSIS task library. Another huge con -- I haven't found a free C# or VB.NET library that does this as of yet. So if anyone knows of one, then please let me know!

    Read the article

  • Silverlight 3: ListBox DataTemplate HorizontalAlignment

    - by Lee
    I have a ListBox with it's ItemTemplate bound to a DataTemplate. My problem is I cannot get the elements in the template to stretch to the full width of the ListBox. <ListBox x:Name="listPeople" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0,0,0,0" Background="{x:Null}" SelectionMode="Extended" Grid.Row="1" ItemTemplate="{StaticResource PersonViewModel.BrowserDataTemplate}" ItemsSource="{Binding Mode=OneWay, Path=SearchResults}" > </ListBox> <DataTemplate x:Key="PersonViewModel.BrowserDataTemplate"> <ListBoxItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,5,5,5"> <Border Opacity=".1" x:Name="itemBorder" Background="#FF000000" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" CornerRadius="5,5,5,5" MinWidth="100" Height="50"/> </Grid> </ListBoxItem> </DataTemplate> As you can see, I have added a border within the grid to indicate the width of the template. My goal is to see this border expand to the full width of the listbox. Currently its width is determined by its contents or MinWidth, which is the only thing at the moment keeping it visible at all.

    Read the article

  • What about the Sql transaction log

    - by Michel
    Hi, i always thought that the sql transaction log keeps track of all the transactions done in the database so it could help recovering the database file in case of a unexpected power down or something like that So then, in normal usage, when the data is committed and written to disk, it is cleared because all the data is nice and safe in the mdf file. Seeing the ldf file grow and reading some i understand that that is not the case, and it will keep growing, until: you shrink the log. Only at that point all the commited transactions are cleared and the log file is shrinked. I found some sp's who should do this, but also found the theory that you first have to backup the database? That last step doesn't make sense to me, so can anyone tell me of that is correct and if so, why that is?

    Read the article

  • How to edit javascript in browser?

    - by Amit
    Hi I was looking for a way to edit javascript in browser such as firefox on the fly and execute it. Firebug allows us to edit html and css on the fly but javascript is a pain.... i have to go back to the source and modify that.. Is there a way to do it?

    Read the article

  • HIt counter in JSF

    - by Hari kanna
    hi expertise... i want 2 add small module hit counter in my web app like in PHP we can use external text file to store number which icrement and write it on webpage but how to use in JSF my app is full of developing JSF...

    Read the article

  • Performance Counters in Server Development

    - by Mubashar Ahmad
    Dear Gurus All you be agree with the value and worth of Performance Counters while developing and maintaining a server kind application I would like to know what is the best way to implement those, Specifically using C#? Usually performance counters have the following attributes They are shared global Writing requires locks to ensure Synchronization Reading Some times requires locks too. Is it better to update them Asynchronously and what is the best way to make them so. (I am planning to use the ThreadPool.QueuWorketItem function, pls tell me you opinion on this too.) If my question seems a bit vague can you just take the example of a HelloWorld Wcf service and i wanted to know following how many times its being hit overall and within a certain period Average/min/max Response Times overall and within a certain period. Moreover if any one knows about the Specialized way provided by DotNet or WCF then please let me know as well.

    Read the article

  • Changing the Module title in DotNetNuke on the Fly

    - by grant.barrington
    This is an extremely short post, buy hopefully it will help others in the situation. (Also if I need to find it again I know where to look) We have recently completed a project using DotNetNuke as our base. The project was for a B2B portal using Microsoft Dynamics NAV as our back-end. We had a requirement where we wanted to change the title of a Module on the fly. This ended up being pretty easy from our module. In our Page_Load event all we had to do was the following. Control ctl = DotNetNuke.Common.Globals.FindControlRecursiveDown(this.ContainerControl, "lblTitle"); if ((ctl != null)) { ((Label)ctl).Text += "- Text Added"; } Thats it. All we do it go up 1 control (this.ContainerControl) and look for the Label called "lblTitle". We then append text to the existing Module title.

    Read the article

  • Getting Started With Sinatra

    - by Liam McLennan
    Sinatra is a Ruby DSL for building web applications. It is distinguished from its peers by its minimalism. Here is hello world in Sinatra: require 'rubygems' require 'sinatra' get '/hi' do "Hello World!" end A haml view is rendered by: def '/' haml :name_of_your_view end Haml is also new to me. It is a ruby-based view engine that uses significant white space to avoid having to close tags. A hello world web page in haml might look like: %html %head %title Hello World %body %div Hello World You see how the structure is communicated using indentation instead of opening and closing tags. It makes views more concise and easier to read. Based on my syntax highlighter for Gherkin I have started to build a sinatra web application that publishes syntax highlighted gherkin feature files. I have found that there is a need to have features online so that customers can access them, and so that they can be linked to project management tools like Jira, Mingle, trac etc. The first thing I want my application to be able to do is display a list of the features that it knows about. This will happen when a user requests the root of the application. Here is my sinatra handler: get '/' do feature_service = Finding::FeatureService.new(Finding::FeatureFileFinder.new, Finding::FeatureReader.new) @features = feature_service.features(settings.feature_path, settings.feature_extensions) haml :index end The handler and the view are in the same scope so the @features variable will be available in the view. This is the same way that rails passes data between actions and views. The view to render the result is: %h2 Features %ul - @features.each do |feature| %li %a{:href => "/feature/#{feature.name}"}= feature.name Clearly this is not a complete web page. I am using a layout to provide the basic html page structure. This view renders an <li> for each feature, with a link to /feature/#{feature.name}. Here is what the page looks like: When the user clicks on one of the links I want to display the contents of that feature file. The required handler is: get '/feature/:feature' do @feature_name = params[:feature] feature_service = Finding::FeatureService.new(Finding::FeatureFileFinder.new, Finding::FeatureReader.new) # TODO replace with feature_service.feature(name) @feature = feature_service.features(settings.feature_path, settings.feature_extensions).find do |feature| feature.name == @feature_name end haml :feature end and the view: %h2= @feature.name %pre{:class => "brush: gherkin"}= @feature.description %div= partial :_back_to_index %script{:type => "text/javascript", :src => "/scripts/shCore.js"} %script{:type => "text/javascript", :src => "/scripts/shBrushGherkin.js"} %script{:type => "text/javascript" } SyntaxHighlighter.all(); Now when I click on the Search link I get a nicely formatted feature file: If you would like see the full source it is available on bitbucket.

    Read the article

  • SQLITE problem in rowid

    - by Saurabh
    I am using SQLite C# library and as per my requirement, before going to add I am retreving the rowid of that table. It is working fine but hetting error when table is empty. Once we add any data(a row) then it’s working fine . mDbCon = GetConnection(); SQLiteCommand cmd = mDbCon.CreateCommand(); cmd.CommandText = " SELECT MAX(rowid) FROM " + “MYTABLE”; cmd.CommandType = CommandType.Text; mDbCon.Open(); SQLiteDataReader sqReader = cmd.ExecuteReader(); while (sqReader.Read()) { if ( sqReader.IsDBNull(0) ) { max = (Int32)sqReader.GetInt32(0); } } mDbCon.Close(); It’s throwing exception when table “MYTABLE” don’t have any data.

    Read the article

  • Multiple Service Address Configs in WCF Silverlight App

    - by CraigS
    My team is building our first significant Silverlight application, using a 3 layered architecture and WCF. We have developed about 10 separate WCF services in the middle layer so far, and this number is only going to grow. Generally, the presentation layer (ie. the Silverlight app) is pointing to the services as hosted on our dev server. However, there are times when I want it to access the services from localhost - ie. the developers machine. Is there an easy way to change where the presentation layer is looking for the services? Is there some way of easily switching between options here?

    Read the article

  • How does a client find the port number of a server?

    - by Jonathan
    Hello all, I am currently learning about basic networking in java. I have been playing around with the server and client relationship between two of my computers. However, I cannot figure out how distributed programs (say, a videogame), can not only find the 'host' computer, but also the port number on which the server is running in order to create a Socket between the two computers. The only way I really see to create a Socket is with an already known IP Address, and with a known port number. How do you search a LAN network for another computer (host) searching for clients? How do you determine what port the server is located on without 'pinging' all available ports for a response (which, I understand, is bad form... Something about 'server attack'...)? In such a situation as a video game, there can be any number of computers on the same network, and any number of them might be attempting to host, or otherwise running the application. Any other important information, or perhaps reference to a more detailed tutorial than the one I am using, regarding making connections on so very little information on the client side would be appreciated. Many thanks, Jonathan

    Read the article

  • Free SMS API

    - by Vasil
    Anyone know of a free SMS API I can integrate in my web application that will enable my users to send a limited amount of free SMS messages?

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >