Friday, 15 January 2010

Determining size of printed page in Excel VBA -


Is VBA a way to determine the width of units of a printed page in Excel?

The example pseudo-code is as follows:

  Duplicate = Vet =  

My initial idea is to write a function that takes in orientation and paper sizes And returns page width back. For example:

  if ActiveSheet.Orientation = xlLandscape and ActiveSheet.PaperSize = xlPaperLetter then dblPaperWidth = 15840 '11 inches twips other ... end if  
< / Div>

Content Management System targeting Mobile Devices -


If I want to implement CMS for mobile devices, then what kind of points should be kept in mind? For example, to reduce page size, use customized (smaller) pictures any other ideas?

Also, what types of rules can be implemented when changing web pages designed for desktop browsers, as well as web browsers that are easily displayed in mobile browsers?

I know that the mobile device is widely varying in capacity and property, but still trying to list some rules.

Apart from this, any other suggestions, suggestions, questions and advice are welcome on this subject.

Thank you for your opinions and answers.

Short introduction, I have all the things listed below


Phone Identifying

While working as a web context with mobile, it is absolutely mandatory that you correctly identify the phone. This should be a top priority; Here are some problems with recognizing the phone and their features:

  • userAgent.contains ("iPhone") Do not use. is already loaded in web bots and other applications wherein iphone is included in its user agent string and thus you recognize them incorrectly.
  • Do not send user-agent to all phones headers Although some of them send URLs: s, in which the format features all the phones. Unfortunately this presents the next two problems:
  • Obviously you will not have access to any device data there and you are bound to use the public data treasure such as . These databases, however, are incomplete, have to stay a little back or do not have the data you want, although these are your best bet for the initial data set.
  • UAProfs lie. Yes, there is false information in it - lots of it! This is partly because the creators forget to update XML and partially because UAProf files are written during the development of the phone and as we know, the features change during development.
  • On a feature when dependent, make sure that you are not relying on the specific version of a particular phone. For example BlackBerry has a feature named Tile which is actually a great bookmark but you only have it all BlackBerry phone, to identify the operating system version of the actual phone to meet the correct variation of the tile For the touchscreen, the same iPhone was not the first with the touch screen and most certainly not the only one - it is not even expected of such a situation where Only one type of processing is input, for example, touch screen, physical keyboard and stylus too.

Creating Original Page

Thankfully that some such people have agreed and when you make pages, you should use it. But oh how things will be so easy ...

  • All phones have different levels of XHTML-MP / CSS support. For example, if I remember correctly, do not support background color for some older blackberry block elements or whenever header tags are many, we also have span has seen the wrong sequence of elements oh and for some reasons tables are really hard. In fact, you have to go lower on markup / styling invoices.
  • You can not test the existence of the feature using the feature. If you want to detect JavaScript support, you might think that by adding some JavaScript to the page will work for that purpose, right? No, it crashes a significant percentage of mobile phones coming to your site. Of course, new phones are not crashed but everyone has bought their phones in the last 12 months apart from the mobile specific javascript API: according to each manufacturer is different, because at present the low to detect JavaScript-based geographic location There are three separate APIs: None of them are interoperative with others.

Add all of these to the top of the usual CMS features (security, content management and changes, caching, modularity, visitor tracking and whatnot) The picture should be how everything affects everything and how you really should consider the cost of making yourself.

In fact though it is against the general sense of SO SO, I strongly suggest that you get the solutions that are easily prepared like our and instead your site Use it for the need to build. Eventually, our product has a special development of seven years under its hood.


Ready-made forum, chat, and PM solutions for Django -


On my DNS site, I want users to communicate with each other in a number of ways:

  1. Forums
  2. Private messages
  3. Chat with rooms and saved history

Can you recommend the solution ready for it? Especially for chat

Also, is it possible to integrate Google Wave into Django?

Looks like you will have a great fit for it in which you have already been listed bundles.


.net - What is the relative path root of DeploymentItemAttribute? -


का उपयोग करना, इसका सापेक्ष पथ जड़ क्या है।

पेज प्रति ...

रिश्तेदार पथ रिश्तेदार पाथ रूट सेटिंग के सापेक्ष हैं जो .testrunconfig फ़ाइल में मिलते हैं।

< / Blockquote>

यह सेटिंग डिफ़ॉल्ट रूप से, समाधान निर्देशिका है इसलिए, यदि आपके पास यह परियोजना संरचना है

  गुप्तप्रोजेक्ट \ घटक- \ अवयव \ संसाधन \ अपेक्षित। Xml घटक। टेस्टकैप्रोजेक्ट test.cs SecretProject.sln  

और आप required.xml परिनियोजित करना चाहते हैं, तो आप इस तरह एक deploymentItemAttribute बनाने जा रहे हैं

  [TestClass] सार्वजनिक वर्ग की टेस्ट {[TestMethod] [ यह प्रतीत होता है कि फ़ाइल गुणों को ' Content <सेट करें < / Strong> 'और'  हमेशा की प्रतिलिपि बनाएं  'या' नया कॉपी करें ' पर उन्नत उदाहरण हैं। 


git, error, entry blah not updaed, cannot merge -


One file can not be merged, how can I merge it with git?

The error message will be ():

  Fatal: entry 'frotz 'Not uptodate can not be merged  

This means that you have local modifications to' frotz , which will be lost at checkout. You can give ' -m ' option to git checkout , which will try to merge in three ways.

Resolve occasionally

  -m - merges  

When switching branches, if you

so the current branch of local modifications in one or more files and the branch that you are switching Are different, the command denies switching branches

The merge process will be:

  git checkout -MMtepec auto-merge frog  

This merged into three ways Area after local modifications not is registered in your index file, so git diff will show you that you've changed since the tip of the new branch.

-m is done while switching branches with option, you will see something like this:

  $ git checkout -m mytopic auto-merging frotz Error: Merge merge into Frotz Fatal: Merge program failed  

At this point, git diff as the previous example Shows well-merged changes, as well as changes in disputed files.
Edit and Resolve Conflict and Resolve it with Mark Add git

  $ frotz $ git frotz in general  

cruisecontrol.net - Fork process with CC .NET -


Is there a way to create a process in Cruise Control .NET? I want CC.net to launch a program when everything goes well, but now, CC.Net insists on the fact that the program will be closed upon completion of the build.

The program that has been started is up to one week at a time.

The way I do this is to use a PowerShell or batch script. The script can launch your process and after returning the executable, you can return to CC.NET as usual. This is the only way I can see, because CC.NET needs to go back and the script can return, even with the process that is running there. A sample PowerShell script is what you want. So you call PowerShell script along the path of XE as the percetimeter.

  Press the $ exepath = $ ("Executionable Path Executionable"). $ $ Item $ exePath  

Here CC.NET 1.5 But how will the powerhell set work

  & lt; Powershell & gt; & Lt; Script & gt; YourScriptName.ps1 & lt; / Script & gt; & Lt; ScriptsDirectory & gt; D: \ CruiseControl & lt; / ScriptsDirectory & gt; & Lt; BuildArgs & gt; You want to kick off the full path of exe & lt; / BuildArgs & gt; & Lt; / Powershell & gt;  

microcontroller - Circular buffer pointer irregularities -


This is the follow-up on this question:.

After applying one to the microcontroller, it seems that there is a problem with the indicator

sent to RS-232: ADE 1234
Received (buffer = 8): E24AE2 / E2AE24 (Flix between the two) received (buffer = 16): D234E1 (A has been omitted because it is a synchronized byte (RX_BufSize = 32): DE1223 / DEE123 / DE1234 / DE12E1 (flip randomly received): Expected receive: DE1234

< P> Start

  Source: Thim 207 BTS Ektroniks - Académie de Strasbourg #define RX_BufSize 8 // Tayl Doo Bfr_araks four Bfr_araks [RX_BufSize]; // buffer circularie D reception four * ptrRX_WRdata = Buffer_RX; // bureau DRX four times * ptrRX_RDdata = buffer_rx; // burer DRX unsigned Charles Buffer_Cmd [7];  

The debug value displayed on the LCD

  // Printed debug value. The decoded output is seen through the U2 Beef Dispstring (-62, 17, 0, "Ply 2"); Four U2buf [] = {slave_command, slave_pal_d, slave_bal_x, slave_bal_y, slave_point_a, slave_point_b, '\ 0'}; Disp_string (-37, 17, 1, U2buf); Four U3buf [] = {buffer_rx [0], buffer_rx [1], buffer_rx [2], buffer_rx [3], buffer_rx [4], buffer_rx [5], buffer_rx [6], buffer_rx [7], '0} ; Disp_string (-37, 27, 1, U3buf); Four U4buf [] = {buffer CMD [0], buffer_cmd [1], buffer_cmd [2], buffer_cmd [3], buffer_cmd [4], buffer_cmd [5], buffer_cmd [6], '\ 0'}; Disp_string (-37, 7, 1, U4buf);  

get the interrupt

  zero _Isr _NOPSV _U1RXInterrupt (zero) {IFS0bits.U1RXIF = 0; While (U1STAbits.URXDA) {* ptrRX_WRdata ++ = U1RXREG; If (ptrRX_WRdata == buffer_x + Rxblufcease) ptrRX_WRdata = buffer_rx; } If (U1STAbits.OERR) {U1STAbits.OERR = 0; }}  

Work from source

  int ReadRXD (char * c) {if (ptrRX_RDdata == ptrRX_WRdata) Return (0); // Pas de caractère reçu else {* c = * ptrRX_RDdata ++; If (ptrRX_RDdata == Buffer_RX + RX_BufSize) ptrRX_RDdata = Buffer_RX; Return (1); }} Zero Detect_Cmd_RXD (zero) {int i; Four c; If (ReadRXD (& amp; c)); ACL_XY_AFFICHER_CARACTERE (5, 3, 256 + 'z', 1); ACL_XY_AFFICHER_CARACTERE (25, 3, 256 + C, 1); For (i = 1; i & lt; 7; i ++) buffer_cmd [i-1] = buffer_cmd [i]; Buffer_Cmd [6] = c; If (buffer_m [0] == 'A') {// & amp; (Buffer_cmd [4] == 0xAA)) {ACL_XY_AFFICHER_CARACTERE (15, 3, 256 + 'Q', 1); Slave_command = buffer_cmd [1]; Slave_pal_d = buffer_mmd [2]; If (system_player == 2) {slave_bal_x = buffer_cmd [3]; Slave_bal_y = buffer_cmd [4]; Slave_point_a = buffer_mmd [5]; Slave_point_b = buffer_mdm [6]; }}}  

Detect_Cmd_RXD is called the second at every 1/256th position. During that time, at least 7 values ​​will be sent in the UART received buffer.

Could it be possible that the process of writing is so fast that it gets caught on reading indicator? What can I do to solve this problem, besides calling Detect_Cmd_RXD most often? First step: If there is a buffer overrush in blockage obstruction, then check for overflow in Detect_Cmd_RXD routine. See that changing the buffer size affects the number of overruns.

The second step: If you reach the buffer size where there is no overrun, and there is still corruption, take a good look at the interrupt routine. UARS can be very sensitive to how you can reach your registrars, or order the operations, check the hardware datasheet and verify that you are reading it correctly - still better, find some sample code that you can do Wish, does the same type. Replacing characters when buffer size is 32, you may be recording data twice before getting the chance to settle down with the status bit.