Search Results

Search found 11822 results on 473 pages for 'ms word'.

Page 97/473 | < Previous Page | 93 94 95 96 97 98 99 100 101 102 103 104  | Next Page >

  • Serving .docx files through Php

    - by user275074
    Hi, I'm having issues when attempting to serve a .docx file using Php. When uploading the file I detect the file mime type and upload the file using the file with the correct extension based on the mime type; e.g. below: application/msword - doc application/vnd.openxmlformats-officedocument.wordprocessingml.document - docx When attempting to serve the files for download, I do the reverse in detecting the extension and serving based on the mime type e.g. public static function fileMimeType($extention) { if(!is_null($extention)) { switch($extention) { case 'txt': return 'text/plain'; break; case 'odt': return 'application/vnd.oasis.opendocument.text'; break; case 'doc': return 'application/msword'; break; case 'docx': return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; break; case ('jpg' || 'jpeg'): return 'image/jpeg'; break; case 'png': return 'image/png'; break; case 'pdf': return 'application/pdf'; break; default: break; } } } All files appear to download correctly and open fine but when attempting to open a docx file, Word (on multiple files) throws a error stating the file is corrupt. Any ideas would be great, thanks.

    Read the article

  • How to save/retrieve words to/from SQlite database?

    - by user998032
    Sorry if I repeat my question but I have still had no clues of what to do and how to deal with the question. My app is a dictionary. I assume that users will need to add words that they want to memorise to a Favourite list. Thus, I created a Favorite button that works on two phases: short-click to save the currently-view word into the Favourite list; and long-click to view the Favourite list so that users can click on any words to look them up again. I go for using a SQlite database to store the favourite words but I wonder how I can do this task. Specifically, my questions are: Should I use the current dictionary SQLite database or create a new SQLite database to favorite words? In each case, what codes do I have to write to cope with the mentioned task? Could anyone there kindly help? Here is the dictionary code: package mydict.app; import java.util.ArrayList; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteException; import android.util.Log; public class DictionaryEngine { static final private String SQL_TAG = "[MyAppName - DictionaryEngine]"; private SQLiteDatabase mDB = null; private String mDBName; private String mDBPath; //private String mDBExtension; public ArrayList<String> lstCurrentWord = null; public ArrayList<String> lstCurrentContent = null; //public ArrayAdapter<String> adapter = null; public DictionaryEngine() { lstCurrentContent = new ArrayList<String>(); lstCurrentWord = new ArrayList<String>(); } public DictionaryEngine(String basePath, String dbName, String dbExtension) { //mDBExtension = getResources().getString(R.string.dbExtension); //mDBExtension = dbExtension; lstCurrentContent = new ArrayList<String>(); lstCurrentWord = new ArrayList<String>(); this.setDatabaseFile(basePath, dbName, dbExtension); } public boolean setDatabaseFile(String basePath, String dbName, String dbExtension) { if (mDB != null) { if (mDB.isOpen() == true) // Database is already opened { if (basePath.equals(mDBPath) && dbName.equals(mDBName)) // the opened database has the same name and path -> do nothing { Log.i(SQL_TAG, "Database is already opened!"); return true; } else { mDB.close(); } } } String fullDbPath=""; try { fullDbPath = basePath + dbName + "/" + dbName + dbExtension; mDB = SQLiteDatabase.openDatabase(fullDbPath, null, SQLiteDatabase.OPEN_READWRITE|SQLiteDatabase.NO_LOCALIZED_COLLATORS); } catch (SQLiteException ex) { ex.printStackTrace(); Log.i(SQL_TAG, "There is no valid dictionary database " + dbName +" at path " + basePath); return false; } if (mDB == null) { return false; } this.mDBName = dbName; this.mDBPath = basePath; Log.i(SQL_TAG,"Database " + dbName + " is opened!"); return true; } public void getWordList(String word) { String query; // encode input String wordEncode = Utility.encodeContent(word); if (word.equals("") || word == null) { query = "SELECT id,word FROM " + mDBName + " LIMIT 0,15" ; } else { query = "SELECT id,word FROM " + mDBName + " WHERE word >= '"+wordEncode+"' LIMIT 0,15"; } //Log.i(SQL_TAG, "query = " + query); Cursor result = mDB.rawQuery(query,null); int indexWordColumn = result.getColumnIndex("Word"); int indexContentColumn = result.getColumnIndex("Content"); if (result != null) { int countRow=result.getCount(); Log.i(SQL_TAG, "countRow = " + countRow); lstCurrentWord.clear(); lstCurrentContent.clear(); if (countRow >= 1) { result.moveToFirst(); String strWord = Utility.decodeContent(result.getString(indexWordColumn)); String strContent = Utility.decodeContent(result.getString(indexContentColumn)); lstCurrentWord.add(0,strWord); lstCurrentContent.add(0,strContent); int i = 0; while (result.moveToNext()) { strWord = Utility.decodeContent(result.getString(indexWordColumn)); strContent = Utility.decodeContent(result.getString(indexContentColumn)); lstCurrentWord.add(i,strWord); lstCurrentContent.add(i,strContent); i++; } } result.close(); } } public Cursor getCursorWordList(String word) { String query; // encode input String wordEncode = Utility.encodeContent(word); if (word.equals("") || word == null) { query = "SELECT id,word FROM " + mDBName + " LIMIT 0,15" ; } else { query = "SELECT id,content,word FROM " + mDBName + " WHERE word >= '"+wordEncode+"' LIMIT 0,15"; } //Log.i(SQL_TAG, "query = " + query); Cursor result = mDB.rawQuery(query,null); return result; } public Cursor getCursorContentFromId(int wordId) { String query; // encode input if (wordId <= 0) { return null; } else { query = "SELECT id,content,word FROM " + mDBName + " WHERE Id = " + wordId ; } //Log.i(SQL_TAG, "query = " + query); Cursor result = mDB.rawQuery(query,null); return result; } public Cursor getCursorContentFromWord(String word) { String query; // encode input if (word == null || word.equals("")) { return null; } else { query = "SELECT id,content,word FROM " + mDBName + " WHERE word = '" + word + "' LIMIT 0,1"; } //Log.i(SQL_TAG, "query = " + query); Cursor result = mDB.rawQuery(query,null); return result; } public void closeDatabase() { mDB.close(); } public boolean isOpen() { return mDB.isOpen(); } public boolean isReadOnly() { return mDB.isReadOnly(); } } And here is the code below the Favourite button to save to and load the Favourite list: btnAddFavourite = (ImageButton) findViewById(R.id.btnAddFavourite); btnAddFavourite.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Add code here to save the favourite, e.g. in the db. Toast toast = Toast.makeText(ContentView.this, R.string.messageWordAddedToFarvourite, Toast.LENGTH_SHORT); toast.show(); } }); btnAddFavourite.setOnLongClickListener(new View.OnLongClickListener() { @Override public boolean onLongClick(View v) { // Open the favourite Activity, which in turn will fetch the saved favourites, to show them. Intent intent = new Intent(getApplicationContext(), FavViewFavourite.class); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); getApplicationContext().startActivity(intent); return false; } }); }

    Read the article

  • How long should one wait before going for a MS?

    - by Jungle Hunter
    Removed duplicate aspects of the question Hi! I'm an undergraduate Master's student. I've what seems to be a good offer in hand in Singapore (if location plays a role). Is an undergraduate Master's good enough for a Master's or one should go for MS? How much time should one wait (in their job) before going for a MS if that's the decision? Does one lose the progress which one makes while at the job before the Master's? Note: Undergraduate Master's is when my degree is called Master's but it is my first degree. This one is a four year one.

    Read the article

  • Does MS create cross browser compatibility problems on purpose? [closed]

    - by P.Brian.Mackey
    IE does some weird **. E.G. Supporting the send() method in AJAX with no params. Poor support for XML (well IE9 I've heard things are alot better), but seriously...since MS owned such a huge market share on browsers were they intentionally dropping in problems like this and making it easy to write crap code to give the impression that competing browsers suck to the layman? Update I realize Javascript's limitations caused some of the Xcompatibility problems. I have read comments from Douglas Crockford regarding how javascript was rushed and exploded in popularity before its time...resulting in some of the issues he can't fix. I'm only concerned specifically about MS's intentions...problems they could have fixed, yet did not. Did any of you work on the IE team or know of articles discussing some details?

    Read the article

  • What should a page's minimum word count be in order to be effectively indexed?

    - by ZakGottlieb
    I'm seeding a new site with hundreds of (high quality) posts, but since I am paying per word written, I'm wondering if anybody in the community has any anecdotal evidence as to how many words of content there should now be for a page to be counted just the same as a 700 word+ post, for example? I know there are always examples of pages ranking well with, for instance, 50 words or less of content, but does anyone have any strong evidence on what the minimum count should be, or has anyone read anything very informative in regards to this issue? Thanks a lot in advance!

    Read the article

  • How can I edit (in MS Expression Web ) FrontPage Site Parameters (Substitutions)?

    - by Clay Nichols
    Or, asked another way: Where are the values for MS Front Page Substitions (Site Parameters) stored? (so that I can edit in Web Expressions) Background I'm ashamed to admit that I've been maintaining our company's website in MS FrontPage for over 9 years. I'm moving it to Expression Web, which will display the Substitutions (stored as Site Parameters) but I can't figure out where to edit them. I tried searching the source folders for the website (on my development PC) for the name of the parameter (s-Variable=hoursOfOperation) but did not find it (other than in the files it was actually used in.

    Read the article

  • What is the proper way to use string::find to look for a word? [migrated]

    - by RubyKing
    How would I look through a string for a word rather then each character in that word. I have my code here and it always seems to find everything that is .obj even if its o or b or j or "." I checked the docuementation here but was unable to find an answer. Here is my code: string &str = *it; if(it->find(".obj")) { cout << "Found .Obj" << endl; } I also tried to use string::compare but that failed.

    Read the article

  • "Microsoft.ACE.OLEDB.12.0 provider is not registered" [RESOLVED]

    - by Azim
    I have a Visual Studio 2008 solution with two projects (a Word-Template project and a VB.Net console application for testing). Both projects reference a database project which opens a connection to an MS-Access 2007 database file and have references to System.Data.OleDb. In the database project I have a function which retrieves a data table as follows private class AdminDatabase ' stores the connection string which is set in the New() method dim strAdminConnection as string public sub New() ... adminName = dlgopen.FileName conAdminDB = New OleDbConnection conAdminDB.ConnectionString = "Data Source='" + adminName + "';" + _ "Provider=Microsoft.ACE.OLEDB.12.0" ' store the connection string in strAdminConnection strAdminConnection = conAdminDB.ConnectionString.ToString() My.Settings.SetUserOverride("AdminConnectionString", strAdminConnection) ... End Sub ' retrieves data from the database Public Function getDataTable(ByVal sqlStatement As String) As DataTable Dim ds As New DataSet Dim dt As New DataTable Dim da As New OleDbDataAdapter Dim localCon As New OleDbConnection localCon.ConnectionString = strAdminConnection Using localCon Dim command As OleDbCommand = localCon.CreateCommand() command.CommandText = sqlStatement localCon.Open() da.SelectCommand = command da.Fill(dt) getDataTable = dt End Using End Function End Class When I call this function from my Word 2007 Template project everything works fine; no errors. But when I run it from the console application it throws the following exception ex = {"The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine."} Both projects have the same reference and the console application did work when I first wrote it (a while ago) but now it has stopped work. I must be missing something but I don't know what. Any ideas?

    Read the article

  • How can I get full filenames from Git difftool (for Microsoft Word "Compare Documents" feature)?

    - by Doug
    I am using the latest version of Git (1.6.6) on a Mac. My wife wants to use Git to manage her fiction writing as long as she can still use Microsoft Word 2008 (Mac). Instead of pushing her into saving everything as plain text, I would like to use Git Difftool to pass the files to Word and use Word's Compare Documents feature. She wouldn't be able to use Git Diff since Word docs are binary files but she could still use Git Difftool. I have written an Applescript which takes two filenames in this format: /Users/foo/Documents/my_novel.docx and opens Word to do the file comparison. However, Git Difftool seems to only pass the bare filenames (e.g. my_novel.docx) as parameters. Is there anyway to get the full filenames from Git Difftool? Thanks, Doug

    Read the article

  • VB.NET error: Microsoft.ACE.OLEDB.12.0 provider is not registered [RESOLVED]

    - by Azim
    I have a Visual Studio 2008 solution with two projects (a Word-Template project and a VB.Net console application for testing). Both projects reference a database project which opens a connection to an MS-Access 2007 database file and have references to System.Data.OleDb. In the database project I have a function which retrieves a data table as follows private class AdminDatabase ' stores the connection string which is set in the New() method dim strAdminConnection as string public sub New() ... adminName = dlgopen.FileName conAdminDB = New OleDbConnection conAdminDB.ConnectionString = "Data Source='" + adminName + "';" + _ "Provider=Microsoft.ACE.OLEDB.12.0" ' store the connection string in strAdminConnection strAdminConnection = conAdminDB.ConnectionString.ToString() My.Settings.SetUserOverride("AdminConnectionString", strAdminConnection) ... End Sub ' retrieves data from the database Public Function getDataTable(ByVal sqlStatement As String) As DataTable Dim ds As New DataSet Dim dt As New DataTable Dim da As New OleDbDataAdapter Dim localCon As New OleDbConnection localCon.ConnectionString = strAdminConnection Using localCon Dim command As OleDbCommand = localCon.CreateCommand() command.CommandText = sqlStatement localCon.Open() da.SelectCommand = command da.Fill(dt) getDataTable = dt End Using End Function End Class When I call this function from my Word 2007 Template project everything works fine; no errors. But when I run it from the console application it throws the following exception ex = {"The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine."} Both projects have the same reference and the console application did work when I first wrote it (a while ago) but now it has stopped work. I must be missing something but I don't know what. Any ideas? Thanks Azim

    Read the article

  • SQL: select rows with the same order as IN clause

    - by Andrea3000
    I know that this question has been asked several times and I've read all the answer but none of them seem to completely solve my problem. I'm switching from a mySQL database to a MS Access database with MS SQL. In both of the case I use a php script to connect to the database and perform SQL queries. I need to find a suitable replacement for a query I used to perform on mySQL. I want to: perform a first query and order records alphabetically based on one of the columns construct a list of IDs which reflects the previous alphabetical order perform a second query with the IN clause applied with the IDs' list and ordered by this list. In mySQL I used to perform the last query this way: SELECT name FROM users WHERE id IN ($name_ids) ORDER BY FIND_IN_SET(id,'$name_ids') Since FIND_IN_SET is available only in mySQL and CHARINDEX and PATINDEX are not available from my php script, how can I achieve this? I know that I could write something like: SELECT name FROM users WHERE id IN ($name_ids) ORDER BY CASE id WHEN ... THEN 1 WHEN ... THEN 2 WHEN ... THEN 3 WHEN ... THEN 4 END but you have to consider that: IDs' list has variable length and elements because it depends on the first query that list can easily contains thousands of elements Have you got any hint on this? Is there a way to programmatically construct the ORDER BY CASE ... WHEN ... statement? Is there a better approach since my list of IDs can be big?

    Read the article

  • Can I use the browser's word-wrapping from JavaScript?

    - by Max
    I have some text in a div. It can be any Unicode text under the sun, including Chinese, Japanese, and Korean. Now, I need to take this text and word-wrap it in JavaScript in some efficient but correct manner. (Because I need to make each line start with "" in a textarea.) Browsers have an implementation of the Unicode Word Wrap algorithm, as is evidenced by word-wrapping Unicode text in a with CSS. (At least, Firefox has such an algorithm, and I suspect other browsers do as well.) What I need is some way for JavaScript to use the same word-wrapping algorithm, so that I can properly wrap and then "quote" Unicode text. Is there any way for JavaScript to use the browser's word-wrapping algorithm, or to know where text has been line-broken in a div or any other element?

    Read the article

  • Given a word, how do I get the list of all words, that differ by one letter?

    - by user187809
    Let's say I have the word "CAT". These words differ from "CAT" by one letter (not the full list) CUT CAP PAT FAT COT etc. Is there an elegant way to generate this? Obviously, one way to do it is through brute force. pseduo code: while (0 to length of word) while (A to Z) replace one letter at a time, and check if the resulting word is a valid word If I had a 10 letter word, the loop would run 26 * 10 = 260 times. Is there a better, elegant way to do this?

    Read the article

  • how run Access 2007 module in Vb6?

    - by Mahmoud
    I have created a module in access 2007 that will update linked tables, but I wanted to run this module from vb6. I have tried this code from Microsoft, but it didnt work. Sub AccessTest1() Dim A As Object Set A = CreateObject("Access.Application") A.Visible = False A.OpenCurrentDatabase (App.Path & "/DataBase/acc.accdb") A.DoCmd.RunMacro "RefreshLinks" End Sub What I am aiming to do, is to allow my program to update all linked tables to new links, in case the program has been used on other computer In case you want to take a look at the module program, here it is: Sub CreateLinkedJetTable() Dim cat As ADOX.Catalog Dim tbl As ADOX.Table Set cat = New ADOX.Catalog ' Open the catalog. cat.ActiveConnection = CurrentProject.Connection Set tbl = New ADOX.Table ' Create the new table. tbl.Name = "Companies" Set tbl.ParentCatalog = cat ' Set the properties to create the link. tbl.Properties("Jet OLEDB:Link Datasource") = CurrentProject.Path & "/db3.mdb" tbl.Properties("Jet OLEDB:Remote Table Name") = "Companies" tbl.Properties("Jet OLEDB:Create Link") = True ' To link a table with a database password set the Link Provider String ' tbl.Properties("Jet OLEDB:Link Provider String") = "MS Access;PWD=Admin;" ' Append the table to the tables collection. cat.Tables.Append tbl Set cat = Nothing End Sub Sub RefreshLinks() Dim cat As ADOX.Catalog Dim tbl As ADOX.Table Set cat = New ADOX.Catalog ' Open the catalog. cat.ActiveConnection = CurrentProject.Connection Set tbl = New ADOX.Table For Each tbl In cat.Tables ' Verify that the table is a linked table. If tbl.Type = "LINK" Then tbl.Properties("Jet OLEDB:Link Datasource") = CurrentProject.Path & "/db3.mdb" ' To refresh a linked table with a database password set the Link Provider String 'tbl.Properties("Jet OLEDB:Link Provider String") = "MS Access;PWD=Admin;" End If Next End Sub

    Read the article

  • Changes in Access DB are not saved since updating to Windows 7

    - by ytoledano
    Hi I'm working with a program that accesses an MS-Access DB. The problem is that if I open the db file with Access, the values I see aren't the values I see when I'm using the program. For example, There is a table PARAMS with various program variables, one of them is the date I last loaded a certain file. In access it reads April 12th 2010, while in the program it reads May 7th 2010 (this is correct). April 12th is about the time I upgraded the computer to Windows 7. Also, the mdb file sits next to the program executable in C:\Program Files (x86); and I know that Win7 doesn't allow programs to write to the program files dir. So where are the changes saved? What I've tried: I've tried opening the mdb file on another computer - still reads the wrong (old) values I've tried copying the entire program dir to a different folder - now both the program and ms-access read the wrong values. Can someone tell me how to get a version of the DB with all the values up to date with the program? Thanks.

    Read the article

  • converting tabular structures in a Word document into an actual table or reading data from the tabul

    - by Chris
    I have a macro which can read the last cell/column of all tables in a Word 2003/2007 document and store the data in an MS-Access table. But, some Word documents have the data in structures like a table format but are not actually tables. The structure looks like a table, but the table borders are actually line connectors. These documents were created by a software(VeryPDF PDF to Word converter) which converted the PDF documents(the original format these documents were) into Word documents. Is there a way I can convert/replace the tabular structures with actual tables in Word so that I can use the macro? Or, is there a way I can read the value of the last column from the tabular structures using some VBA code? Any advice would be appreciated.

    Read the article

  • SQL - Query range between two dates (NON-VBA)

    - by Mohgeroth
    I see various topics on this around stack overflow but none that fit the contect of MS-Access... Given a starting date and an ending date, is there a way through SQL to return records for each given month within the time frame? EG: Between #1/1/2010# and #12/31/2010# results #1/4/2010# #1/11/2010# ..... #12/27/2010# Restrictions MS-Access 2003 :No Case/Loops inside the SQL (IIF statements are good) This is a view only, NO VBA will be used since the data will not be tampered with. Disconnected recordset is my last option. I would prefer to find out theres some way to call your customized functions in the SQL to help return these values... some class stored on a global scope while you iterate through this date range maybe... Is this possible? I see many no's, but if there was a way to pass a value into a function I could find a way to make this work. Sad that I don't have a way to simulate a stored procedure without using a d/c recordset, at least that I know of... any experts out there know a way?

    Read the article

  • How to test my outgoing emails in MS Outlook?

    - by John
    Some people are complaining my html emails are showing up as plain text with html mark ups and others are complaining about unusual characters like 0=D 3=D. They appear to be using MS Outlook. I just installed MS Outlook and configured the imap settings to work with my gmail account. All my emails appear fine. So I suspect I need my MS Outlook to work with an MS Exchange server in order to produce the results my other Outlook recipients are seeing. But I'm not sure how to get access to an MS Exchange server (assuming that is the case). Can anyone recommend how I can reproduce the same email environment as my recipients such that I can get the same bugs they get? Thanks

    Read the article

  • extreme slowness with a remote database in Drupal

    - by ceejayoz
    We're attempting to scale our Drupal installations up and have decided on some dedicated MySQL boxes. Unfortunately, we're running into extreme slowness when we attempt to use the remote DB - page load times go from ~200 milliseconds to 5-10 seconds. Latency between the servers is minimal - a tenth or two of a millisecond. PING 10.37.66.175 (10.37.66.175) 56(84) bytes of data. 64 bytes from 10.37.66.175: icmp_seq=1 ttl=64 time=0.145 ms 64 bytes from 10.37.66.175: icmp_seq=2 ttl=64 time=0.157 ms 64 bytes from 10.37.66.175: icmp_seq=3 ttl=64 time=0.157 ms 64 bytes from 10.37.66.175: icmp_seq=4 ttl=64 time=0.144 ms 64 bytes from 10.37.66.175: icmp_seq=5 ttl=64 time=0.121 ms 64 bytes from 10.37.66.175: icmp_seq=6 ttl=64 time=0.122 ms 64 bytes from 10.37.66.175: icmp_seq=7 ttl=64 time=0.163 ms 64 bytes from 10.37.66.175: icmp_seq=8 ttl=64 time=0.115 ms 64 bytes from 10.37.66.175: icmp_seq=9 ttl=64 time=0.484 ms 64 bytes from 10.37.66.175: icmp_seq=10 ttl=64 time=0.156 ms --- 10.37.66.175 ping statistics --- 10 packets transmitted, 10 received, 0% packet loss, time 8998ms rtt min/avg/max/mdev = 0.115/0.176/0.484/0.104 ms Drupal's devel.module timers show the database queries aren't running any slower on the remote DB - about 150 microseconds whether it's the local or the remote server. Profiling with XHProf shows PHP execution times that aren't out of whack, either. Number of queries doesn't seem to make a difference - we seem the same 5-10 second delay whether a page has 12 queries or 250. Any suggestions about where I should start troubleshooting here? I'm quite confused.

    Read the article

  • How to fix massive lag on ZyXEL HomePlug AV powerline adapters?

    - by Tim Abell
    I have 3 ZyXEL Homeplug AV powerline adapters as per the one in the review below. I have two plugged in currently, one into my Be / Thompson wireless router, and one into my desktop pc (box1). every now and then the link indicator on the adapters (the mains link, not the ethernet link) goes nutty, and performance falls off a cliff (see below). http://www.gadgetspeak.com/gadget/article.rhtm/753/479266/ZyXEL_PowerLine_HomePlug_AV_PLA401.html 64 bytes from box1 (192.168.1.101): icmp_seq=1064 ttl=64 time=996 ms 64 bytes from box1 (192.168.1.101): icmp_seq=1065 ttl=64 time=549 ms 64 bytes from box1 (192.168.1.101): icmp_seq=1066 ttl=64 time=6.15 ms 64 bytes from box1 (192.168.1.101): icmp_seq=1067 ttl=64 time=1400 ms 64 bytes from box1 (192.168.1.101): icmp_seq=1068 ttl=64 time=812 ms 64 bytes from box1 (192.168.1.101): icmp_seq=1069 ttl=64 time=11.1 ms 64 bytes from box1 (192.168.1.101): icmp_seq=1070 ttl=64 time=1185 ms 64 bytes from box1 (192.168.1.101): icmp_seq=1071 ttl=64 time=501 ms 64 bytes from box1 (192.168.1.101): icmp_seq=1072 ttl=64 time=1975 ms 64 bytes from box1 (192.168.1.101): icmp_seq=1073 ttl=64 time=970 ms ^C --- box1 ping statistics --- 1074 packets transmitted, 394 received, +487 errors, 63% packet loss, time 1082497ms rtt min/avg/max/mdev = 5.945/598.452/3526.454/639.768 ms, pipe 4 Any idea how to diagnose/fix? I'm on linux so installing the windoze software that came with them is not something I'm terribly keen to do.

    Read the article

  • What's going on with traceroute?

    - by Kevin
    The following is what happens when I run traceroute from a certain location: # traceroute google.com traceroute to google.com (74.125.227.39), 30 hops max, 60 byte packets 1 gateway.local.enactpc.com (10.0.0.1) 0.138 ms 0.101 ms 0.084 ms 2 * * * 3 * * * 4 * * * 5 * * * 6 * * * 7 * * * 8 * * * 9 * * * 10 * * * 11 * * * 12 * * * 13 * * * 14 * * * 15 * * * 16 * * * 17 * * * 18 * * * 19 * * * 20 * * * 21 * * * 22 * * * 23 * * * 24 * * * 25 * * * 26 * * * 27 * * * 28 * * * 29 * * * 30 * * * Absolutely nothing of interest... Now, originally I thought this was just a fact of the location's network set up. (I assume they block pings or something...) However, watch what happens when I use nmap to run a traceroute... # nmap -sP --traceroute google.com Starting Nmap 5.21 ( http://nmap.org ) at 2012-09-25 22:18 CDT Nmap scan report for google.com (74.125.227.40) Host is up (0.034s latency). Hostname google.com resolves to 11 IPs. Only scanned 74.125.227.40 rDNS record for 74.125.227.40: dfw06s06-in-f8.1e100.net TRACEROUTE (using proto 1/icmp) HOP RTT ADDRESS 1 0.19 ms gateway.local.enactpc.com (10.0.0.1) 2 1.93 ms 99-20-92-1.lightspeed.austtx.sbcglobal.net (99.20.92.1) 3 25.61 ms 99-20-92-2.lightspeed.austtx.sbcglobal.net (99.20.92.2) 4 ... 6 7 23.68 ms 12.83.68.137 8 31.30 ms gar23.dlstx.ip.att.net (12.122.85.73) 9 ... 10 31.82 ms 72.14.233.65 11 32.27 ms 209.85.250.77 12 32.98 ms dfw06s06-in-f8.1e100.net (74.125.227.40) Nmap done: 1 IP address (1 host up) scanned in 3.29 seconds When using nmap I get A LOT more results than with traceroute, why? Note, I checked, and the difference in target IP addresses is not related...

    Read the article

  • Sending and receiving a TMemoryStream using IdTCPClient and IdTCPServer

    - by Martin Melka
    I found Remy Lebeau's chat demo of IdTCP components in XE2 and I wanted to play with it a little bit. (It can be found here) I would like to send a picture using these components and the best approach seems to be using TMemoryStream. If I send strings, the connection works fine, the strings are transmitted successfully, however when I change it to Stream instead, it doesn't work. Here is the code: Server procedure TMainForm.IdTCPServerExecute(AContext: TIdContext); var rcvdMsg: string; ms:TMemoryStream; begin // This commented code is working, it receives and sends strings. // rcvdMsg:=AContext.Connection.IOHandler.ReadLn; // LogMessage('<ServerExec> '+rcvdMsg); // // TResponseSync.SendResponse(AContext, rcvdMsg); try ms:=TMemoryStream.Create; AContext.Connection.IOHandler.ReadStream(ms); ms.SaveToFile('c:\networked.bmp'); except LogMessage('Failed to receive',clred); end; end; Client procedure TfrmMain.Button1Click(Sender: TObject); var ms: TMemoryStream; bmp: TBitmap; pic: TPicture; s: string; begin // Again, this code is working for sending strings. // s:=edMsg.Text; // Client.IOHandler.WriteLn(s); ms:=TMemoryStream.Create; pic:=TPicture.Create; pic.LoadFromFile('c:\Back.png'); bmp:=TBitmap.Create; bmp.Width:=pic.Width; bmp.Height:=pic.Height; bmp.Canvas.Draw(0,0,pic.Graphic); bmp.SaveToStream(ms); ms.Position:=0; Client.IOHandler.Write(ms); ms.Free; end; When I try to send the stream from the client, nothing observable happens (breakpoint in the OnExecute doesn't fire). However, when closing the programs(after sending the MemoryStream), two things happen: If the Client is closed first, only then does the except part get processed (the log displays the 'Failed to receive' error. However, even if I place a breakpoint on the first line of the try-except block, it somehow gets skipped and only the error is displayed). If the Server is closed first, the IDE doesn't change back from debug, Client doesn't change its state to disconnected (as it normally does when server disconnects) and after the Client is closed as well, an Access Violation error from the Server app appears. I guess this means that there is a thread of the Server still running and maintaining the connection. But no matter how much time i give it, it never completes the task of receiving the MemoryStream. Note: The server uses IdSchedulerOfThreadDefault and IdAntiFreeze, if that matters. As I can't find any reliable source of help for the revamped Indy 10 (it all appears to apply for the older Indy 10, or even Indy 9), I hope you can tell me what is wrong. Thanks - ANSWER - SERVER procedure TMainForm.IdTCPServerExecute(AContext: TIdContext); var size: integer; ms:TMemoryStream; begin try ms:=TMemoryStream.Create; size:=AContext.Connection.IOHandler.ReadLongInt; AContext.Connection.IOHandler.ReadStream(ms, size); ms.SaveToFile('c:\networked.bmp'); except LogMessage('Failed to receive',clred); end; end; CLIENT procedure TfrmMain.Button1Click(Sender: TObject); var ms: TMemoryStream; bmp: TBitmap; pic: TPicture; begin ms:=TMemoryStream.Create; pic:=TPicture.Create; pic.LoadFromFile('c:\Back.png'); bmp:=TBitmap.Create; bmp.Width:=pic.Width; bmp.Height:=pic.Height; bmp.Canvas.Draw(0,0,pic.Graphic); bmp.SaveToStream(ms); ms.Position:=0; Client.IOHandler.Write(ms, 0, True); ms.Free; end;

    Read the article

  • ICalendar not readable by google calendar.

    - by Sagar
    Operating system : WinXP Program and version you use to access Google Calendar (FF3.5): I'm developing a script (based on an existing vCal ASP.NET class I found online) to generate an .ics file. This file works perfectly when importing to Outlook 2003. When I try to import to Google Calendar, I get the following error: Failed to import events: Unable to process your iCal/CSV file.. I don't know too much about the vCal format or syntax, but everything looks fine to me. I'll post the sample test calendar .ics below: BEGIN:VCALENDAR PRODID:-//jpalm.se//iCalendar example with ASP.NET MVC//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:PUBLISH X-MS-OLK-FORCEINSPECTOROPEN:TRUE BEGIN:VEVENT DTSTART:20100304T000000Z DTEND:20100304T000000Z TRANSP:OPAQUE SEQUENCE:0 UID:7c9d6dd7-41f2-4171-8ae4-35820974efa4 DESCRIPTION:uba:Project20100321:sagar . SUMMARY:First Milestone END:VEVENT X-MS-OLK-FORCEINSPECTOROPEN:TRUE BEGIN:VEVENT DTSTART:20100330T230000Z DTEND:20100330T230000Z TRANSP:OPAQUE SEQUENCE:0 UID:8a982519-b99b-429a-8dad-c0f95c50d0e6 DESCRIPTION:uba:Project20100321:imanage2010 pm SUMMARY:upcoming milestones END:VEVENT X-MS-OLK-FORCEINSPECTOROPEN:TRUE BEGIN:VEVENT DTSTART:20100329T230000Z DTEND:20100329T230000Z TRANSP:OPAQUE SEQUENCE:0 UID:588750a1-6f10-4b5d-8a51-3f3818024726 DESCRIPTION:uba:Project20100321:sagar . SUMMARY:test END:VEVENT X-MS-OLK-FORCEINSPECTOROPEN:TRUE BEGIN:VEVENT DTSTART:20100407T230000Z DTEND:20100407T230000Z TRANSP:OPAQUE SEQUENCE:0 UID:36eaa726-a0a0-40a1-ba7c-09857f8ed006 DESCRIPTION:uba:Project20100321:imanage2010 pm SUMMARY:Rad apps devs END:VEVENT X-MS-OLK-FORCEINSPECTOROPEN:TRUE BEGIN:VEVENT DTSTART:20100408T125632Z DTEND:20100408T125632Z TRANSP:OPAQUE SEQUENCE:0 UID:8521ad53-916a-43cc-8eeb-42c1b3d670d3 DESCRIPTION:uba:Project20100321:imanage2010 pm SUMMARY:this is a test ms END:VEVENT X-MS-OLK-FORCEINSPECTOROPEN:TRUE BEGIN:VEVENT DTSTART:20100415T125643Z DTEND:20100415T125643Z TRANSP:OPAQUE SEQUENCE:0 UID:e4b295d8-2271-4393-9899-3e9c858f4e8c DESCRIPTION:uba:Project20100321:imanage2010 pm SUMMARY:Test msssss END:VEVENT X-MS-OLK-FORCEINSPECTOROPEN:TRUE BEGIN:VEVENT DTSTART:20100430T055201Z DTEND:20100430T055201Z TRANSP:OPAQUE SEQUENCE:0 UID:1e464698-1064-4cb2-8166-2a843b63ca5a DESCRIPTION:uba:Project20100321:imanage2010 pm SUMMARY:this is a new milestones for testing on 30th april END:VEVENT X-MS-OLK-FORCEINSPECTOROPEN:TRUE BEGIN:VEVENT DTSTART:20100731T093917Z DTEND:20100731T093917Z TRANSP:OPAQUE SEQUENCE:0 UID:5262ef58-73bc-4d66-a207-4e884e249629 DESCRIPTION:uba:Project20100321:imanage2010 pm SUMMARY:555555555555555555 END:VEVENT X-MS-OLK-FORCEINSPECTOROPEN:TRUE BEGIN:VEVENT DTSTART:20100328T230000Z DTEND:20100328T230000Z TRANSP:OPAQUE SEQUENCE:0 UID:f654262d-714e-41d9-9690-005bb467f8aa DESCRIPTION:uba:Untitled project:imanage2010 pm SUMMARY:first milestone END:VEVENT X-MS-OLK-FORCEINSPECTOROPEN:TRUE BEGIN:VEVENT DTSTART:20100401T095537Z DTEND:20100401T095537Z TRANSP:OPAQUE SEQUENCE:0 UID:3f4a6c16-f460-457d-a281-b4c010958796 DESCRIPTION:uba:ProjectIcal:imanage2010 pm SUMMARY:new ms ical END:VEVENT X-MS-OLK-FORCEINSPECTOROPEN:TRUE BEGIN:VEVENT DTSTART:20100331T230000Z DTEND:20100331T230000Z TRANSP:OPAQUE SEQUENCE:0 UID:e5bf28d1-3559-48e9-90f8-2b5233489a13 DESCRIPTION:uba:ProjectIcal:imanage2010 pm SUMMARY:new ms 2 ical END:VEVENT END:VCALENDAR And the source for generating the above code is which is nothing but the mvc view:: <%@ Import Namespace ="iManageProjectPM.Controllers" % <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage"% BEGIN:VCALENDAR VERSION:2.0<%if (Model.Events.Count 1) {% CALSCALE:GREGORIAN METHOD:PUBLISH<%}% X-MS-OLK-FORCEINSPECTOROPEN:TRUE <%foreach(var evnt in Model.Events){% BEGIN:VEVENT DTSTART<%=Model.GetTimeString(evnt.StartTime)% DTEND<%=Model.GetTimeString(evnt.EndTime)% TRANSP:OPAQUE SEQUENCE:0 UID:<%=evnt.UID% DESCRIPTION:<%=evnt.Desc% SUMMARY:<%=evnt.Title% END:VEVENT<%}% END:VCALENDAR

    Read the article

  • Python structure mistake

    - by jaddy123
    I'm writing a program in which I can Reverse the sequence and Replace all As with Ts, all Cs with Gs, all Gs with Cs, and all Ts with As. the program is to read a sequence of bases and output the reverse complement sequence. I am having trouble to do it so can anyone please help me with this by having a look on my code: word = raw_input("Enter sequence: ") a = word.replace('A', 'T') b = word.replace('C', 'G') c = word.replace('G', 'C') d = word.replace('T', 'A') if a == word and b == word and c == word and d == word: print "Reverse complement sequence: ", word And I want this sort of output: Enter sequence: CGGTGATGCAAGG Reverse complement sequence: CCTTGCATCACCG Regards

    Read the article

  • Convert OpenXml Excel files to HTML

    - by necrostaz
    Hello. I'm developing printing solution for MS Office 2007, office automation is not good for me, because it requires installed office. Open XML Document Viewer is solution for converting Word files (.docx) to HTML format by XSLT transform, but it works only for .docx. Can you suppose related or similar solutions for Excel spreadsheets files? Thanks.

    Read the article

< Previous Page | 93 94 95 96 97 98 99 100 101 102 103 104  | Next Page >