Daily Archives

Articles indexed Saturday November 10 2012

Page 8/12 | < Previous Page | 4 5 6 7 8 9 10 11 12  | Next Page >

  • Any tips on switching from bash to zsh if often using shell inside of emacs?

    - by justingordon
    Related to this question: Advantages and disadvantages between zsh and emacs' (e)shell, I've read some great things about zsh, when using M-x shell, my familiar emacs shell seemed like it would need some customizations. I also use evil-mode in shell mode, so that means I use vi keystrokes for shell editing. Took a little while to get accustomed to this, but I really like it. Any advice or tips on going from bash to zsh if one uses emacs? Or better off adding the file completion mentioned in this question: Worth switching to zsh for casual use?.

    Read the article

  • Android ImageButton not firing the onclick event, what is wrong with my code?

    - by kimo
    I have very simple code that includes ImageButton with OnClickListener that points to another Activity, the click on the ImageButton doesn't fire the onClick (The same problem was with Button) : public class ToolsActivity extends Activity { private ImageButton btnCamera; final Context context = ToolsActivity.this; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_tools); this.btnCamera = (ImageButton) findViewById(R.id.cameraButton); this.btnCamera.setOnClickListener(new OnClickListener() { public void onClick(View v) { Intent intent = new Intent(context,MainActivity.class); startActivity(intent); } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_tools, menu); return true; } XML: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingLeft="16dp" android:paddingRight="16dp" > <ImageButton android:id="@+id/cameraButton" android:layout_width="100dp" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:background="@drawable/btncamera" android:contentDescription="@string/desc" />

    Read the article

  • JAVA : How to get the positions of all matches in a String?

    - by user692704
    I have a text document and a query (the query could be more than one word). I want to find the position of all occurrences of the query in the document. I thought of the documentText.indexOf(query) and using regular expression but I could not make it work. I end up with the following method: First, I have create a dataType called QueryOccurrence public class QueryOccurrence implements Serializable{ public QueryOccurrence(){} private int start; private int end; public QueryOccurrence(int nameStart,int nameEnd,String nameText){ start=nameStart; end=nameEnd; } public int getStart(){ return start; } public int getEnd(){ return end; } public void SetStart(int i){ start=i; } public void SetEnd(int i){ end=i; } } Then, I have used this datatype in the following method: public static List<QueryOccurrence>FindQueryPositions(String documentText, String query){ // Normalize do the following: lower case, trim, and remove punctuation String normalizedQuery = Normalize.Normalize(query); String normalizedDocument = Normalize.Normalize(documentText); String[] documentWords = normalizedDocument.split(" ");; String[] queryArray = normalizedQuery.split(" "); List<QueryOccurrence> foundQueries = new ArrayList(); QueryOccurrence foundQuery = new QueryOccurrence(); int index = 0; for (String word : documentWords) { if (word.equals(queryArray[0])){ foundQuery.SetStart(index); } if (word.equals(queryArray[queryArray.length-1])){ foundQuery.SetEnd(index); if((foundQuery.End()-foundQuery.Start())+1==queryArray.length){ //add the found query to the list foundQueries.add(foundQuery); //flush the foundQuery variable to use it again foundQuery= new QueryOccurrence(); } } index++; } return foundQueries; } This method return a list of all occurrence of the query in the document each one with its position. Could you suggest any easer and faster way to accomplish this task. Thanks

    Read the article

  • xml regular expression/regex OR operator

    - by Naz Haque
    Hi am trying to use a regeX to read through my document to identify currency types whether they're $,£ or a €. The regex I've created doesn't seem to work, somebody please advise me what it should be. I'd really appreciate the help: The regEX I've created ("\$|£|€]")is in a simpleType within my XSD file used for validating a document. The code is show after the colon, please note to display on stackoverflow I've had to remove the open/close tags (<): xs:simpleType name="currencyType" xs:restriction base="utf8-string" xs:length value="1" / xs:pattern value="[\$|£|€]"/ /xs:restriction /xs:simpleType

    Read the article

  • PHP - Undefined index error

    - by user1815290
    This is my form with a file input field named "photo": <form action = "spremi-film.php" method = "POST" enctype = "multipart/form-data"> <div class="grid_2">Naslov:</div> <div class="grid_10"><input type="text" name="naslov" value="" /></div> <div class="grid_2">Žanr: </div> <div class="grid_10"><?php izborZanra(); ?></div> <div class="grid_2">Godina: </div> <div class="grid_10"><?php izborGodine(); ?></div> <div class="grid_2">Trajanje:</div> <div class="grid_10"><input type="text" name="trajanje" value="" /></div> <div class="grid_2">Izbor slike:</div> <!--<input type="hidden" name="MAX_FILE_SIZE" value="30000" />--> <div class="grid_10"><input type="file" name="photo" /></div> <div class="grid_12"><input type="submit" value="SPREMI" /></div> </form> After that i put this code: $uploaddir = '/slike'; $uploadfile = $uploaddir . basename($_FILES['photo']['name']); //echo '<pre>'; if(move_uploaded_file($_FILES['photo']['tmp_name'], $uploadfile)) { echo 'Slika je uspješno spremljena!'; } else { echo 'Slika nije spremljena!'; } //print_r($_FILES); //echo '</pre>'; When i run this i have an undefined index: photo notice in my browser. Help, please.

    Read the article

  • Unable to plot graph using matplotlib

    - by Aman Deep Gautam
    I have the following code which searches all the directory in the current directory and then takes data from those files to plot the graph. The data is read correctly as verified by printing but there are no points plotted on graph. import argparse import os import matplotlib.pyplot as plt #find the present working directory pwd=os.path.dirname(os.path.abspath(__file__)) #find all the folders in the present working directory. dirs = [f for f in os.listdir('.') if os.path.isdir(f)] plt.figure() plt.xlim(0, 20000) plt.ylim(0, 1) for directory in dirs: os.chdir(os.path.join(pwd, directory)); chd_dir = os.path.dirname(os.path.abspath(__file__)) files = [ fl for fl in os.listdir('.') if os.path.isfile(fl) ] print files for f in files: f_obj = open(os.path.join(chd_dir, f), 'r') list_x = [] list_y = [] for i in xrange(0,4): f_obj.next() for line in f_obj: temp_list = line.split() print temp_list list_y.append(temp_list[0]) list_x.append(temp_list[1]) print 'final_lsit' print list_x print list_y plt.plot(list_x, list_y, 'r.') f_obj.close() os.chdir(pwd) plt.savefig("test.jpg") The input files look like the following: 5 865 14709 15573 14709 1.32667e-06 664 0.815601 14719 1.55333e-06 674 0.813277 14729 1.82667e-06 684 0.810185 14739 1.4e-06 694 0.808459 Can anybody help me with why this is happening? Being new I would like to know some tutorial where I can get help with kind of plotting as the tutorial I was following made me end up here. Any help appreciated.

    Read the article

  • C# DataTable to Json?

    - by AliRiza Adiyahsi
    I want to get DataTable as Json Format to show it on a chart. public JsonResult GetDataTable() { DataTable dt = new DataTable(); dt.Columns.Add("Jan"); dt.Columns.Add("Feb"); dt.Columns.Add("Mar"); dt.Columns.Add("Apr"); for (int i = 0; i < 10; i++) { dt.Rows.Add(i * 5, i * 10, i * 15, i * 11); } // JsonDataTable = dt to Json return new JsonResult { Data = new { success = true, chartData = JsonDataTable }, JsonRequestBehavior = JsonRequestBehavior.AllowGet }; } How Can I convert DataTable to Json? Thanks.

    Read the article

  • back button android

    - by Raogrimm
    i am having trouble implementing the back button properly. all of the code snippets i have seen have not worked for me. what i am trying to do when i press the back button is just go back to the previous list. pretty much i have a list within a list and i just want it to go back to the previous list. how would i go about doing this? this is the list i have, every item has a separate list that it has. lets say you click on weapons, you then get a list of different weapon types and so on final String[] weapons = getResources().getStringArray(R.array.weapons); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, weapons)); lv.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View view, int position, long id) { System.out.println("item clicked: "+weapons[position]); switch(position) { case 0: final String[] axes = getResources().getStringArray(R.array.axes); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, axes)); break; case 1: final String[] clubs = getResources().getStringArray(R.array.clubs); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, clubs)); break; case 2: final String[] daggers = getResources().getStringArray(R.array.daggers); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, daggers)); break; case 3: final String[] great_axes = getResources().getStringArray(R.array.great_axes); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, great_axes)); break; case 4: final String[] great_katana = getResources().getStringArray(R.array.great_katana); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, great_katana)); break; case 5: final String[] great_swords = getResources().getStringArray(R.array.great_swords); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, great_swords)); break; case 6: final String[] hand_to_hand = getResources().getStringArray(R.array.hand_to_hand); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, hand_to_hand)); break; case 7: final String[] katana = getResources().getStringArray(R.array.katana); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, katana)); break; case 8: final String[] polearms = getResources().getStringArray(R.array.polearms); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, polearms)); break; case 9: final String[] scythes = getResources().getStringArray(R.array.scythes); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, scythes)); break; case 10: final String[] staves = getResources().getStringArray(R.array.staves); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, staves)); break; case 11: final String[] swords = getResources().getStringArray(R.array.swords); setListAdapter(new ArrayAdapter<String>(ffxidirectory.this, R.layout.list_item, swords)); break; } } });

    Read the article

  • Socket.io Duplicate clients on a namespace

    - by Servernumber
    Hi I'm trying to use dynamic namespace to create them on demand. It's working except that I get duplicate or more client for some reason Server side : io.of("/" + group ).on("connection", function(socket_group) { socket_group.groupId = group; socket_group.on("infos", function(){ console.log("on the group !"); }) socket_group.on('list', function () { Urls.find({'group' : '...'}).sort({ '_id' : -1 }).limit(10).exec(function(err, data){ socket_group.emit('links', data); }); }) [...] }) Client Side : socket.emit('list', { ... }); On the client side only one command is sent but the server is always responding with 2 or more responses. Every time I close/open my app the response is incremented. Thanks if you find out.

    Read the article

  • HTML/CSS formating

    - by Codeguy007
    I'm having to issues lining up items properly in my html code. I am not sure why they are lining up the way I want them to. First the header My Color Library is a full line height above the horizontal ruler. I want it right above the ruler. Second my X box in the td with the background is justified right fine but I actually want it in the top right hand corner not centered vertically. Here's some example html: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>FunctionalColor&amp;Design</title> </head> <html> <body> <table style="width=900px; margin-left: auto; margin-right: auto;"> <tr> <td> <P> <div style="font-size: 1em; line-height: 1em; font-weight: bolder; padding: 0px;">My Color Library</div> <div align="right" class="removeall"> <a href="colors"> <img src="http://2100computerlane.net/workingproject/images/x-button.png" /> <bold>Remove All</bold> </a> </div> <HR/></p> <div class="mycolor"> <table><!--width="900px" --> <tr> <td style="border: none; background-color: #f8d3cf; width:125px; height:80px; border-spacing: 10px; padding:0;"> <div style="padding:0; vertical-align:top;" align="right" class="remove"> <a href="f8d3cf" style="padding: 0px;"> <img src="http://2100computerlane.net/workingproject/images/x-button.png" style="padding: 0px;"/> </a> </div> </td> <td style="border: none; width:10px;"></td> <td style="border: none; background-color: #f8d3cf; width:125px; height:80px; border-spacing: 10px; padding:0;"></td> <td style="border: none; width:10px;"></td> <td style="border: none; background-color: #f8d3cf; width:125px; height:80px; border-spacing: 10px; padding:0;"></td> <td style="border: none; width:10px;"></td> <td style="border: none; background-color: #f8d3cf; width:125px; height:80px; border-spacing: 10px; padding:0;"></td> <td style="border: none; width:10px;"></td> <td style="border: none; background-color: #f8d3cf; width:125px; height:80px; border-spacing: 10px; padding:0;"></td> <td style="border: none; width:10px;"></td> <td style="border: none; background-color: #f8d3cf; width:125px; height:80px; border-spacing: 10px; padding:0;"></td> <tr> <td style="border: none; font:.6em Arial, Helvetica, sans-serif; width:125px; height:20px;">Desert Warmth<br/>70YR 56/190 A0542</td> </tr> </table> </div> </td> </tr> </table> </body> </html>

    Read the article

  • Hide segment in URL but give code access to hidden segment

    - by Brandon Durham
    I'm using Structure and have a "Supernav" page with multiple children that will make up the supernav for the site. I thought this would be a nice way to have all pages on the site accessible to the client via one location: the Structure UI. If you visit any of the child pages in the "supernav" group the URL comes out like this: http://website.com/supernav/prospective-students I'd love to be able to remove the supernav segment of those URLs so that it ends up being: http://website.com/prospective-students I don't even want the supernav segment to appear in the status bar when you hover over these links on the page. Is this possible? With CodeIgniter this comes down to a simple routing rule, but I don't know if that's an option with EE. Appreciate any help I can get!

    Read the article

  • Can't get findnext property of range class error

    - by Lawrence Knowlton
    I am trying to parse a report in Excel 2007. It is basically a report of accounting charge exceptions. The report has sections with a header for each type of exception. There are types of exceptions that are deleted from the report. I'm using a Do While loop to find each header and if the section needs to be deleted I have it do so. If nothing needs to be deleted the code works fine, but right after a section is deleted I get an "Unable to get the FindNext property of the Range Class" error. Here is my code: Sub merge_All_Section_Headers() ' Description: ' The next portion macro will find and format the Tranaction Source rows in the file ' by checking each row in column A for the following text: TRANSA. If a cell ' has this text in it, it is selected and a function called merge_text_cells ' is run, which performs concatenation of each Transaction Source header row and ' deletes the text from the rest of the cells with broken up text. ' lastRow = ActiveSheet.UsedRange.Rows.Count + 1 Range(lastRow & ":" & lastRow).Delete ActiveSheet.PageSetup.Orientation = xlLandscape With ActiveSheet.Range("A:A") Dim searchString As String searchString = "TRANSA" 'The following sets stringFound to either true or false based on whether or not 'the searchString (TRANSA) is found or not): Set stringFound = .Find(searchString, LookIn:=xlValues, lookat:=xlPart) If Not stringFound Is Nothing Then firstLocation = stringFound.Address Do stringFound.Select lastFound = stringFound.Address merge_Text_Cells If ((InStr(ActiveCell.Text, "CHARGE FILER") = 0) And _ (InStr(ActiveCell.Text, "CREDIT FILER") = 0) And _ (InStr(ActiveCell.Text, "PA MIDNIGHT FINAL") = 0) And _ (InStr(ActiveCell.Text, "BAD DEBT TURNOVER") = 0)) Then section_Del 'Function that deletes unwanted sections End If Range(lastFound).Select Set stringFound = .FindNext(stringFound) Loop While Not stringFound Is Nothing And stringFound.Address <> firstLocation End If End With Like I said it works fine when the section_Del is commented out. Any ideas as to how to remedy this would be greatly appreciated. Thanks!

    Read the article

  • IE8 ignores absolute positioning and margin:auto

    - by tuff
    I have a lightbox-style div with scrolling content that I am trying to restrict to a reasonable size within the viewport. I also want this div to be horizontally centered. This is all easy in Fx/Chrome/IE9. My problem is that IE8 ignores the absolute positioning which I use to size the content, and the rule margin: 0 auto which I use to horizontally center the lightbox. 1) Why? 2) What are my options for workarounds? EDIT: The centering issue is fixed by setting text-align:center on the parent element, but I have no idea why that works since the element I want to center is not inline. Still stuck on the absolute positioning stuff. HTML: <div class="bg"> <div class="a"> <div class="aa">titlebar</div> <div class="b"> <!-- many lines of content here --> </div> </div> </div> CSS: body { overflow: hidden; height: 100%; margin: 0; padding: 0; } /* IE8 needs ruleset above */ .bg { background: #333; position: fixed; top: 0; right: 0; bottom: 0; left: 0; height: 100%; /* needed in IE8 or the bg will only be as tall as the lightbox */ } .a { background: #eee; border: 3px solid #000; height: 80%; max-height: 800px; min-height: 200px; margin: 0 auto; position: relative; width: 80%; min-width: 200px; max-width: 800px; } .aa { background: lightblue; height: 28px; line-height: 28px; text-align: center; } .b { background: coral; overflow: auto; padding: 20px; position: absolute; top: 30px; right: 0; bottom: 0; left: 0; } Here's a demo of the problem: http://jsbin.com/urikoj/1/edit

    Read the article

  • A rectangle drawn with DrawingContext.DrawRectangle blocks mouse

    - by dharmatech
    The WPF program below puts up a window which looks like this: Mouse-movement outside the black square causes the window title to be updated with the mouse's position. The updating stops when the mouse enters the square. I'd like for MouseMove to continue to trigger even when the mouse is over the square. Is there a way to do this? using System.Windows; using System.Windows.Controls; using System.Windows.Media; namespace Wpf_Particle_Demo { class DrawingVisualElement : FrameworkElement { public DrawingVisual visual; public DrawingVisualElement() { visual = new DrawingVisual(); } protected override int VisualChildrenCount { get { return 1; } } protected override Visual GetVisualChild(int index) { return visual; } } public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); var canvas = new Canvas(); Content = canvas; var element = new DrawingVisualElement(); canvas.Children.Add(element); CompositionTarget.Rendering += (s, e) => { using (var dc = element.visual.RenderOpen()) dc.DrawRectangle(Brushes.Black, null, new Rect(0, 0, 50, 50)); }; MouseMove += (s, e) => Title = e.GetPosition(canvas).ToString(); } } }

    Read the article

  • How can I make my search more broad?

    - by user1804952
    I created this search mysql string and it is to literal or maybe un-literal? If I search for Dave for example it will only find items like "Dave something" and not find Dave. $queryArtist = mysql_query("SELECT * FROM artists WHERE artist LIKE '%$ArtistNameSearch%' ORDER BY artist ASC"); I know mysql_query is out dated and will change it to mysqli soon as I get this worked out. Stuck here. An example of it no working is Example of search Could it be becasue the %20 space? I got it figured out, but it still does NOT find one direction or other things even those exist. here is what I have now $queryArtist = mysql_query("SELECT * FROM artists WHERE match(artist) against('$SafeSearchTerm' in boolean mode)");

    Read the article

  • Export data from mysql table row into an array format

    - by user1804952
    I am trying to output data from table : artists row : artist into this format. Artist Names can have special characters and there are over 16k of them. It needs to be written to a file. called anything artist.php for example $Artist = array( "Name from database", "Name from database", "Name from database", "Name from database", "Name from database" ); ok sorry for not explaining. do this for ajax auto complete.. so i need to create a file with this array in it. here is the exact script http://www.brandspankingnew.net/specials/ajax_autosuggest/ajax_autosuggest_autocomplete.html

    Read the article

  • The youtube API sometimes throws error: Call to a member function children() on a non-object

    - by Anna Lica
    When i launch the php script, sometime works fine, but many other times it retrieve me this errror Fatal error: Call to a member function children() on a non-object in /membri/americanhorizon/ytvideo/rilevametadatadaurlyoutube.php on line 21 This is the first part of the code // set feed URL $feedURL = 'http://gdata.youtube.com/feeds/api/videos/dZec2Lbr_r8'; // read feed into SimpleXML object $entry = simplexml_load_file($feedURL); $video = parseVideoEntry($entry); function parseVideoEntry($entry) { $obj= new stdClass; // get nodes in media: namespace for media information $media = $entry->children('http://search.yahoo.com/mrss/'); //<----this is the doomed line 21 UPDATE: solution adopted for ($i=0 ; $i< count($fileArray); $i++) { // set feed URL $feedURL = 'http://gdata.youtube.com/feeds/api/videos/'.$fileArray[$i]; // read feed into SimpleXML object $entry = simplexml_load_file($feedURL); if ( is_object($entry)) { $video = parseVideoEntry($entry); echo ($video->description."|".$video->length); echo "<br>"; } else { $i--; } } In this mode i force the script to re-check the file that caused the error

    Read the article

  • BasicAuthProvider in ServiceStack

    - by Per
    I've got an issue with the BasicAuthProvider in ServiceStack. POST-ing to the CredentialsAuthProvider (/auth/credentials) is working fine. The problem is that when GET-ing (in Chrome): http://foo:pwd@localhost:81/tag/string/list the following is the result Handler for Request not found: Request.HttpMethod: GET Request.HttpMethod: GET Request.PathInfo: /login Request.QueryString: System.Collections.Specialized.NameValueCollection Request.RawUrl: /login?redirect=http%3a%2f%2flocalhost%3a81%2ftag%2fstring%2flist which tells me that it redirected me to /login instead of serving the /tag/... request. Here's the entire code for my AppHost: public class AppHost : AppHostHttpListenerBase, IMessageSubscriber { private ITagProvider myTagProvider; private IMessageSender mySender; private const string UserName = "foo"; private const string Password = "pwd"; public AppHost( TagConfig config, IMessageSender sender ) : base( "BM App Host", typeof( AppHost ).Assembly ) { myTagProvider = new TagProvider( config ); mySender = sender; } public class CustomUserSession : AuthUserSession { public override void OnAuthenticated( IServiceBase authService, IAuthSession session, IOAuthTokens tokens, System.Collections.Generic.Dictionary<string, string> authInfo ) { authService.RequestContext.Get<IHttpRequest>().SaveSession( session ); } } public override void Configure( Funq.Container container ) { Plugins.Add( new MetadataFeature() ); container.Register<BeyondMeasure.WebAPI.Services.Tags.ITagProvider>( myTagProvider ); container.Register<IMessageSender>( mySender ); Plugins.Add( new AuthFeature( () => new CustomUserSession(), new AuthProvider[] { new CredentialsAuthProvider(), //HTML Form post of UserName/Password credentials new BasicAuthProvider(), //Sign-in with Basic Auth } ) ); container.Register<ICacheClient>( new MemoryCacheClient() ); var userRep = new InMemoryAuthRepository(); container.Register<IUserAuthRepository>( userRep ); string hash; string salt; new SaltedHash().GetHashAndSaltString( Password, out hash, out salt ); // Create test user userRep.CreateUserAuth( new UserAuth { Id = 1, DisplayName = "DisplayName", Email = "[email protected]", UserName = UserName, FirstName = "FirstName", LastName = "LastName", PasswordHash = hash, Salt = salt, }, Password ); } } Could someone please tell me what I'm doing wrong with either the SS configuration or how I am calling the service, i.e. why does it not accept the supplied user/pwd? Update1: Request/Response captured in Fiddler2when only BasicAuthProvider is used. No Auth header sent in the request, but also no Auth header in the response. GET /tag/string/AAA HTTP/1.1 Host: localhost:81 Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8,sv;q=0.6 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 Cookie: ss-pid=Hu2zuD/T8USgvC8FinMC9Q==; X-UAId=1; ss-id=1HTqSQI9IUqRAGxM8vKlPA== HTTP/1.1 302 Found Location: /login?redirect=http%3a%2f%2flocalhost%3a81%2ftag%2fstring%2fAAA Server: Microsoft-HTTPAPI/2.0 X-Powered-By: ServiceStack/3,926 Win32NT/.NET Date: Sat, 10 Nov 2012 22:41:51 GMT Content-Length: 0 Update2 Request/Response with HtmlRedirect = null . SS now answers with the Auth header, which Chrome then issues a second request for and authentication succeeds GET http://localhost:81/tag/string/Abc HTTP/1.1 Host: localhost:81 Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8,sv;q=0.6 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 Cookie: ss-pid=Hu2zuD/T8USgvC8FinMC9Q==; X-UAId=1; ss-id=1HTqSQI9IUqRAGxM8vKlPA== HTTP/1.1 401 Unauthorized Transfer-Encoding: chunked Server: Microsoft-HTTPAPI/2.0 X-Powered-By: ServiceStack/3,926 Win32NT/.NET WWW-Authenticate: basic realm="/auth/basic" Date: Sat, 10 Nov 2012 22:49:19 GMT 0 GET http://localhost:81/tag/string/Abc HTTP/1.1 Host: localhost:81 Connection: keep-alive Authorization: Basic Zm9vOnB3ZA== User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8,sv;q=0.6 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 Cookie: ss-pid=Hu2zuD/T8USgvC8FinMC9Q==; X-UAId=1; ss-id=1HTqSQI9IUqRAGxM8vKlPA==

    Read the article

  • Get "term is undefined” error when trying to assign arrayList to List component dataSource

    - by user1814467
    I'm creating an online game where people log in and then have the list of current players displayed. When the user enters a "room" it dispatches an SFSEvent which includes a Room object with the list of users as User objects in that room. As that event's callback function, I get the list of current users which is an Array, switch the View Stack child index, and then I wrap the user list array in an ArrayList before I assign it to the MXML Spark List component's dataSource. Here's my code: My Actionscript Code Section (PreGame.as): private function onRoomJoin(event:SFSEvent):void { const room:Room = this._sfs.getRoomByName(PREGAME_ROOM); this.selectedChild = waitingRoom; /** I know I should be using event listeners * but this is a temporary fix, otherwise * I keep getting null object errors * do to the li_users list not being * created in time for the dataProvider assignment **/ setTimeout(function ():void { const userList:ArrayList = new ArrayList(room.userList); this.li_users.dataProvider = userList; // This is where the error gets thrown },1000); } My MXML Code: <?xml version="1.0" encoding="utf-8"?> <mx:ViewStack xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" initialize="preGame_initializeHandler(event)" > <fx:Script source="PreGame.as"/> <s:NavigatorContent id="nc_loginScreen"> /** Login Screen Code **/ </s:NavigatorContent> /** Start of Waiting Room code **/ <s:NavigatorContent id="waitingRoom"> <s:Panel id="pn_users" width="400" height="400" title="Users"> /** This is the List in question **/ <s:List id="li_users" width="100%" height="100%"/> </s:Panel> </s:NavigatorContent> </mx:ViewStack> However, I keep getting this error: TypeError: Error #1010: A term is undefined and has no properties Any ideas what I'm doing wrong? The arrayList has data, so I know it's not empty/null.

    Read the article

  • Git is not using the first editor in my $PATH

    - by GuillaumeA
    I am using OS X 10.8, and I used brew to install a more recent version of emacs than the one shipped with OS X. The newer emacs binary is installed in /usr/local/bin (24.2.1), and the old "shipped-with-osx" one in /usr/bin (22.1.1). I updated my $PATH env variable by prepending /usr/local/bin to it. It works fine in my shell (ie. typing emacs runs the 24.2.1 version), but when git opens the editor, the emacs version is 22.1.1. Isn't git supposed to use $PATH to find the editor I want to use ? Additional informations: $ type -a emacs emacs is /usr/local/bin/emacs emacs is /usr/bin/emacs emacs is /usr/local/bin/emacs $ env PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin SHELL=/bin/zsh PAGER=most EDITOR=emacs -nw _=/usr/bin/env Please note that I'd prefer not to set the absolute path of my editor directly in my git conf, as I use this conf across multiple systems. EDIT: Here's an bit of my .zshrc: # Mac OS X if [ `uname` = "Darwin" ]; then # Brew binaries PATH="/usr/local/bin":"/usr/local/sbin":$PATH else # Everyone else (Linux) # snip fi So, yes, I could add a line export EDITOR='/usr/local/bin emacs -nw' in the first if, but I'd like to understand why git is not using my PATH variable :)

    Read the article

  • Book Review: Professional ASP.Net MVC4

    - by Sam Abraham
    The past few weeks have been particularly busy as I continue to dedicate a bigger portion of my free time to refreshing my memory and enhancing my knowledge of best practices pertaining to technologies we plan on using for a major upcoming project. In this blog post, I will be providing a brief overview of my latest reading “Professional ASP.Net MVC4” by Jon Galloway, Phil Haack, Brad Wilson and K. Scott Allen. This book is a must read for web developers looking to enhance their MVC expertise with best practices and tips shared from recognized industry experts. This book takes the reader on a 16-chapter long journey towards being a better ASP.NET MVC developer with chapter 16 putting all information covered in practical context by dissecting the implementation of Nuget.org, a real-life open-source, ASP.NET MVC project.  All code samples referenced in this book are conveniently accessible via NuGet, a free, open-source Library package manager that installs as a Visual Studio Extension. Chapters 2, 3 and 4 thoroughly cover MVC’s various components: Controllers “C”, Views “V” and Models “M” respectively. Chapter 5 covers additional extension methods (Helpers) provided to speed and ease the use of common HTML elements such as forms, textboxes, grids, to name a few… Chapter 6 tackles built-in validation while providing examples and use cases on implementing custom validation that plugs into the MVC framework. Chapters 7 thru 13 discusses the latest on Membership, Ajax, Routing, NuGet and the ASP.Net Web API. Chapters 12 (Dependency Injection) and 13 (Unit Testing) demonstrate a big competitive advantage of MVC with its ease of test-ability and plug-ability. Chapters 14 and 15 targets the advanced developer showcasing how to extend MVC to customize and replace every piece in the framework.In conclusion, I strongly recommend Professional ASP.NET MVC 4 as an excellent read for both developers already using MVC as well as those getting started with the framework.   Many thanks to the Wiley/Wrox User Group Program for their support of our West Palm Beach Developers’ Group.  You can access my reviews of books I recently read: Professional ASP.NET Design Patterns Professional WCF 4.0 Inside Windows Communication Foundation Inside Microsoft SQL Server 2008 series

    Read the article

  • SharePoint Conference 2012&ndash;How To Find Me

    - by MOSSLover
    Hey guys I will be at the conference if you don’t follow me on twitter and you want to find me.  Look around the Women in SharePoint area in the Community Lounge.  If you don’t find me at the Community Lounge then I would say try to look at the Planet Technologies booth for me.  If you don’t find me in that booth then try Booth #22 the SharePoint Pavilion.  If I’m not in any of these places I’m either in a session, sleeping, running, or wearing a cloaking device.  You can ask me all kinds of questions about Planet, Women in SharePoint, and such.  I can try to answer the questions as best I can or direct you to someone smarter.  See you all at SPC 12! Technorati Tags: SPC12,SharePoint

    Read the article

  • connecting to server with multiple nics in other vlan

    - by Thierry
    I have a windows 2003 server with 3 nics on 3 vlan's (this is in domain 1). nic 1 has a default gateway to my router/firewall (sonicwall). In nic 2 and 3 I have left it empty, because it is advised like that everywhere. Within this domain and VLAN's 1-3 everything works fine. BUT... I have a second domain (domain 2) with a 4th Vlan (all 4 VLAN's connected to the same router/firewall) from which my clients need to access the 2003 server in domain 1 (it's my antivirus management console for both domains). when i ping the server from my vlan4 by it's FQDN, it randomly chooses ip from nic 1, 2 or 3 from my 2003 server. (logically because that server is know in DNS with it's 3 IP-addresses. And that is needed for my VLAN's 1-3) I don't really have a problem with that. BUT, I only get an answer of NIC1 (which sounds logically to me, because it's the only one with a gateway). It is not a router problem, because I'm testing in this phase and ping from vlan4 to any machine in vlan1, 2 or 3 that has 1 nic works just fine. If i add a gateway to nic2 and nic3, I get answer from all 3 nics and this works fine. But I know it's adviced to not do that. Can anyone give me advice in this particular case? Would it really be a problem to add a gateway to nic 2 and 3? They would be pointing to the same router/firewall (only with different ip-address, based on the vlan). Or is there another good solution to fix this problem? Thank's in advance, Thierry.

    Read the article

  • LUNs disappear after rebooting the ESX/ESXi host

    - by mariolos
    A single LUN among from a group disappeared. Neither the host nor the Vcenter can see it. Four virtual machines on the LUN now are unknown. The strange thing is the LUN is now available in the list when you try to ADD datastore from configuration == storage == Add Datastore But this cannot help me since i need the vms on the lun and i do not get options to add the lun without formating it to VMFS How can i get the lun back or atleast be able to copy the vms from it

    Read the article

  • Dynamic dns client stops updating when login off Windows

    - by Sami-L
    Running a dynamic dns updater software on Windows server 2008 R2, when I log off the software stops updating, I concluded that I have to look for a dynamic dns client running as service, I found this task a bit heavy since there is a big variety on the net, it needs a long time to make the right choice as many details are to pay attention to, free, masked fees, fees, installed on machine, configured on router, trusted, not trusted, compliant with OS, not, ... That's why I am here to ask for help on this matter, I would like to be advised by skilled people, to find a trusted free dns updater (client) for Windows which can run as service, and maybe which can send email when update fails.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12  | Next Page >