Search Results

Search found 296 results on 12 pages for 'hai bison'.

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

  • What do I need to know to design a language and write a interpreter for it?

    - by alFReD NSH
    I know this question has been asked and even there are thousands of books and articles about it. But the problem is that there are too many, and I don't know are they good enough, I have to design a language and write a interpreter for it. The base language is javascript (using nodejs) but it's ok if the compiler was written in another language that I can use from node. I had done a research about compiler compilers in JS, there is jison (Bison implementaion in JS), waxeye, peg.js. I decided to give jison a try, due to the popularity and its being used by coffee script, so it should be able to cover my language too. The grammar definition syntax is similar to bison. But when I tried read the bison manual it seemed very hard to understand for me. And I think it's because I don't know a lot of things about what I'm doing. Like I don't what is formal language theory. I am experienced in Javascript (I'm more talented in JS than most average programmers). And also know basic C and C++ (not much experience but can write a working code for basic things). I haven't had any formal education, so I may not be familiar with some software engineering and computer science principles. Though everyday I try to grasp a lot of articles and improve. So I'm asking if you know any good book or article that can help me. Please also write why the resource you're suggesting is good. --update-- The language I'm trying to create, is not really complicated. All it has is expressions (with or without units), comparisons and logical operators. There are no functions, loops, ... The goal is to create a language that non-programmers can easily learn. And to write customized validations and calculations.

    Read the article

  • How to right align the search box [closed]

    - by Hai Vu
    I am a newbie in HTML, CSS. I am working on a simple web app using CherryPy and ran into the following problem. The page I serve has a h1 title and a form for search box. I would like to lay them out on the same line with the h1 left aligned and the form right align, like this: My H1 Title here [ ] Search But instead, I got them in two separate lines: My H1 Title here [ ] Search My HTML code: <span class="header"> <h1>${pagetitle}</h1> </span> <span class="searchbox"> <form> <input type="text" name="searchterm"> <input type="submit" value="Search"> </form> </span> My CSS: span.header { text-align: left; } span.searchbox { text-align: right; } I have tried to work around using table, but was told to use span to do the right thing. I appreciate your help to set it right.

    Read the article

  • Is there a remote desktop or vnc app for the IPad that properly handles Bluetooth keyboard shortcuts?

    - by Steve Bison
    I've tried 4 or 5 remote desktop apps, the most notable being Jump Desktop and Splashtop Streamer. Most of these remote desktop apps have some sort of on-screen keyboard for typing with the IPad, including special keys like shift, control, alt. The special keys act like "sticky keys" meaning they stay depressed until another key is pressed, to make it easier to do key combinations. Even non-standard keyboard combinations like shift+enter work, in this sticky sense. When using a Bluetooth keyboard with the remote desktop apps, both Jump and Splashtop Streamer recognize the shift + letter combination for doing capital letters. However, generically pressing shift, cntrl, or alt does not depress the sticky on screen shift buttons or do anything at all. Only a few combinations are recognized (again like shift+letter, cntrl+C). Most combinations do not work (shift+enter, alt+tab). Even having the keyboard shortcuts work like sticky keys (press shift then enter, not both at once) would be much better than the limited functionality they have now. Is there an app, jailbreak app, or workaround that lets me use bluetooth keyboard properly with remote desktop on the ipad?

    Read the article

  • FragmentActivity doesn't see activity in onActivityCreate(), after screen orientation changed

    - by hai bison
    I'm using Android support library v13. There is a strange thing I couldn't understand. When creating new activity, I load fragment as: Main activity layout: ... <FrameLayout android:id="@+id/fragment_1" ... /> In onCreate() of main activity: mFragment = (FragmentActivity) getSupportFragmentManager().findFragmentById(R.id.fragment_1); // if screen orientation changed, no need to create new instance of fragment if (mFragment == null) { mFragment = ...; // create new instance of fragment FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); ft.replace(R.id.fragment_1, mFragment); // because this is called ONCE, we can use this method ft.commitAllowingStateLoss(); } Now, everything works perfectly in emulators 1.5, 1.6 and 2.2. I have a phone 2.2.2. But there is an exception: if the app is running, and screen orientation changed. Inside onActivityCreated(), getActivity() sometimes returns null. This only happens in emulators 1.5/ 1.6/ 2.2. My phone 2.2.2 works very well, I test hundreds of times but never catch that bug. Even other emulators 3.x, 4.x work well too. Unfortunately I don't have phone 1.5/ 1.6/ 2.2. So did you have experience with this? Is that a bug of the support library, or emulators? Could you please help me? Thank you in advance.

    Read the article

  • Cannot connect to Xen domU via VNC if X isn't installed on domU

    - by Hai Minh Nguyen
    I'm trying to build a Xen domU that can be connected through the Xen's VNC server. Below is the template (actually it's generated by OpenNebula): name = 'one-153' #O CPU_CREDITS = 256 memory = '128' bootloader = "/usr/bin/pygrub" disk = ['tap:aio:/home/oneadmin/cloud/one/var/153/images/disk.0,xvda,w',] vif = ['mac=02:00:c0:a8:00:03,bridge=virbr0',] vfb = ['type=vnc,vnclisten=slave1,vncdisplay=1,vncpasswd=v98KXdFN'] The problem is that I can't connect to the domU if it doesn't have X. In this case all I got is a blank screen. Besides, if the domU has X, the screen is still blank until the login prompt appears, while it should be like this. Some information that may be useful: The domU and the dom0 both run CentOS 5.5. If the domU has X, it can be connected even when both X and the domU's VNC server isn't running. The VNC client is RealVNC.

    Read the article

  • How do I learn IPSec VPN implementation on FreeBSD from pfSense

    - by Lang Hai
    I've been trying to figure out a complete working solution for IPSec VPN implementation on FreeBSD but with no luck till now. pfSense seems did a fantastic job on supporting IPSec and even for mobile clients, so I downloaded and installed pfSense hoping to figure out how it works, or at least see some configuration examples, but I couldn't find anything interesting maybe because I'm not familiar with pfSense, so I'd like to ask for help. How pfSense implements IPSec, what tools are used? Where does pfSense store all its configuration files? And since pfSense has its own kernel mods and acts as a different OS, there's no way for us to install it on top of an existing FreeBSD box, and plus that it is such a great project combining those fantastic features, so my question can kinda be extended as: How do we learn from pfSense, and implement its features on top of a regular FreeBSD server?

    Read the article

  • Help about pure-ftp

    - by hai
    I setup pure-ftp on freebsd behind firewall. On pure-ftp setuped passsi mode ftp(rangle port 50400-50600) and firewall open port from 50400-50600 (include mode IN and out). But i try use ftp client connect but not connect. Nofinication error status: Connecting to 210.245.89.95:21... Status: Connection established, waiting for welcome message... Response: 220---------- Welcome to Pure-FTPd [privsep] ---------- Response: 220-You are user number 1 of 50 allowed. Response: 220-Local time is now 13:20. Server port: 21. Response: 220-IPv6 connections are also welcome on this server. Response: 220 You will be disconnected after 15 minutes of inactivity. Command: USER bk Response: 331 User bk OK. Password required Command: PASS Response: 230 OK. Current directory is / Command: SYST Response: 215 UNIX Type: L8 Command: FEAT Response: 211-Extensions supported: Response: EPRT Response: IDLE Response: MDTM Response: SIZE Response: REST STREAM Response: MLST type;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*; Response: MLSD Response: ESTA Response: PASV Response: EPSV Response: SPSV Response: ESTP Response: 211 End. Status: Connected Status: Retrieving directory listing... Command: PWD Response: 257 "/" is your current location Command: TYPE I Response: 200 TYPE is now 8-bit binary Command: PASV Response: 227 Entering Passive Mode (210,245,88,98,138,1) Command: MLSD Error: Connection timed out Error: Failed to retrieve directory listing Status: Connecting to 210.245.88.98:21... Status: Connection established, waiting for welcome message... Help me.

    Read the article

  • How to access Windows Azure management portal from Linux/Ubuntu

    - by Zaar Hai
    Good day everyone! I have only Ubuntu/Debian machines in my office. I've registered for Windows Azure platform and try to enter their management portal (https://windows.azure.com/default.aspx), but it requires Microsoft Silverlight. I've tried installing latest Moonlight plugin availabing for Ubuntu 11.04, but without any success - after login I see blank page and nothing more (tried both firefox 7.0.1 and chromium-14). Does anyone know how to enter Microsoft Azure management portal from Ubuntu 11.04 or any other linux? Thank you, Zaar

    Read the article

  • Lost SSH Key, is it possible to log in via some other method now?

    - by Daniel Hai
    So I happened to do the cardinal sin of administration. I changed the openssh settings, and accidently closed that terminal before I could test it, and of course, now I'm completely locked out. I was using password-less private key authentication. Am I completely screwed out of my server? This is a VPS system -- is there a way where I could have someone at the datacenter log in locally and redo the ssh settings?

    Read the article

  • Setup SVN repository subfolder specific write permission

    - by Hai Lang
    I need to setup a SVN repository which the devgroup should have full privilege to read and write except for two sub folders /1 and /2. For /1 and /2, four users should have write permission and all other users should only have read permission. I put the following into the configuration file, but people in devgroup still have write permission in /1 and /2. Any help would be highly appreciated. [project:/] @devgroup = rw [project:/1] @devgroup = r user1 = rw user2 = rw user3 = rw user4 = rw [project:/2] @devgroup = r user1 = rw user2 = rw user3 = rw user4 = rw

    Read the article

  • How to get a particular part of a String

    - by Harish
    I am writing a macro in Excel where I need to get a substring from a String. Its like this. ~/tester/test/hai/bye ~/stack/overflow/hai/bye In the above cases I need to take the String tester from the first one and stack from the second one.I tried using the Instr but its not useful.Can anyone help this?

    Read the article

  • Mimicking a HBox / VBox with CSS

    - by Daniel Hai
    I'm an old school tables guy, and am pretty baffled when it comes to modern HTML. I'm trying to something as simple as vertical / horizontal layouts (i.e. Flex's hbox/vbox), but am having major difficulty replicating them. An old table would look something like this for an HBox: <table width="100%" height="100"> <tr valign="middle"> <td nowrap style="background-color:#CCC">I am text on grey</td> <td width="50%" valign="top">displays top</td> <td width="50%" align="right">Autosize Fill (displays bottom right)</td> </tr> </table> Now I'm trying to do this with div's, but to no avail. When using display:inline, I cannot set a percentage width -- it only takes explicit widths. When using float:left, settings 100% percentage width causes it to really be 100% and pushes the next div down. Here's the code I've been playing with: <html> <head> </head> <style type="text/css"> div.test { background-color: #EE9; padding:5px;} body { font-family: Arial; } ul { list-style-type:none; } ul li { float:left; } .hboxinline div { display: inline; } .hboxfloat div { float:left; } .cellA { background-color:#CCC; width:100%; } .cellB { background-color:#DDD; min-width:100; } .cellC { background-color:#EEE; min-width:200; } </style> <body> A = 100%, b = 100, c = 200 <div class="test">old school table <table cellpadding="0" cellspacing="0"> <tr> <td class="cellA">A</td> <td class="cellB">B</td> <td class="cellC">C</td> </tr> </table></div> <br/> <div class="test"> float:left <div class="hboxinline"> <div class="cellA">A</div> <div class="cellB">B</div> <div class="cellC">C</div> </div> </div> <br/> <div class="test">ul / li <ul class="ulli"> <li class="cellA">A</li> <li class="cellB">B</li> <li class="cellC">C</li> </ul> </div> <br/> <div class="test"> display:inline <div class="hboxfloat"> <div class="cellA">A</div> <div class="cellB">B</div> <div class="cellC">C</div> </div> </div> </body> </html>

    Read the article

  • List All Google Map Marker Images

    - by Dau Thanh Hai
    Do you often use image marker from google or copy it to your server? Where I can get all images list of available markers from google? The list of images such as : http://maps.gstatic.com/intl/en_ALL/mapfiles/dd-end.png http://maps.gstatic.com/intl/en_ALL/mapfiles/dd-start.png

    Read the article

  • logger chain in python

    - by Zaar Hai
    I'm writing python package/module and would like the logging messages mention what module/class/function they come from. I.e. if I run this code: import mymodule.utils.worker as worker w = worker.Worker() w.run() I'd like to logging messages looks like this: 2010-06-07 15:15:29 INFO mymodule.utils.worker.Worker.run <pid/threadid>: Hello from worker How can I accomplish this? Thanks.

    Read the article

  • Boost Binary Endian parser not working?

    - by Hai
    I am studying how to use boost spirit Qi binary endian parser. I write a small test parser program according to here and basics examples, but it doesn't work proper. It gave me the msg:"Error:no match". Here is my code. #include "boost/spirit/include/qi.hpp" #include "boost/spirit/include/phoenix_core.hpp" #include "boost/spirit/include/phoenix_operator.hpp" #include "boost/spirit/include/qi_binary.hpp" // parsing binary data in various endianness template '<'typename P, typename T void binary_parser( char const* input, P const& endian_word_type, T& voxel, bool full_match = true) { using boost::spirit::qi::parse; char const* f(input); char const* l(f + strlen(f)); bool result1 = parse(f,l,endian_word_type,voxel); bool result2 =((!full_match) || (f ==l)); if ( result1 && result2) { //doing nothing, parsing data is pass to voxel alreay } else { std::cerr << "Error: not match!!" << std::endl; exit(1); } } typedef boost::uint16_t bs_int16; typedef boost::uint32_t bs_int32; int main ( int argc, char *argv[] ) { namespace qi = boost::spirit::qi; namespace ascii = boost::spirit::ascii; using qi::big_word; using qi::big_dword; boost::uint32_t ui; float uf; binary_parser("\x01\x02\x03\x04",big_word,ui); assert(ui=0x01020304); binary_parser("\x01\x02\x03\x04",big_word,uf); assert(uf=0x01020304); return 0; }' I almost copy the example, but why this binary parser doesn't work. I use Mac OS 10.5.8 and gcc 4.01 compiler.

    Read the article

  • Android Bitmap.createBitmap returns negative mHeight

    - by Hai Bi
    Modifying the Snake example. An exception was created from the bitmap class. So I debug the original Snake, and found that in TileView there is a function loadTile, Bitmap bitmap = Bitmap.createBitmap(mTileSize, mTileSize, Bitmap.Config.ARGB_8888); after the above assignment, the bitmap had -1 for mHeight and mWidth. Then how does the Snake even work? I am just use the Eclipse and the virtual machine, not a real android phone.

    Read the article

  • nginx - how do I get rewrite directives to execute before index directives?

    - by Daniel Hai
    I'm trying a simple internal rewrite with nginx to navigate to a sub-directory depending on the user_agent -- mobile browsers go to /mobile, otherwise they go to /www however it seems that when I rewrite these urls, the index directive is processed before the rewrites, so I end up getting 403 forbidden. # TEST FOR INDEX index index.php # TEST PHONES if ($http_user_agent ~* '(iPhone|iPod)') { rewrite ^(.*)$ /mobile$1 break; } # OTHERWISE WE ARE DONE rewrite ^(.*)$ /www$1 break; when I turn off the re-writes and hit the hostname (http://www.somehost.com/) the index is displayed correctly. When they are on, I have to explicitly navigate to somehost.com/index.php to get the script to run ... Do I have to explicity test for directories, and then re-write to an index.php file, or is there a simpler solution?

    Read the article

  • Batch file script for Enable & disable the "use automatic Configuration Script"

    - by Tijo Joy
    My intention is to create a .bat file that toggles the check box of "use automatic Configuration Script" in Internet Settings. The following is my script @echo OFF setlocal ENABLEEXTENSIONS set KEY_NAME="HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" set VALUE_NAME=AutoConfigURL FOR /F "usebackq skip=1 tokens=1-3" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul`) DO ( set ValueName=%%A set ValueType=%%B set ValueValue=%%C ) @echo Value Name = %ValueName% @echo Value Type = %ValueType% @echo Value Value = %ValueValue% IF NOT %ValueValue%==yyyy ( reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /t REG_SZ /d "yyyy" /f echo Proxy Enabled ) else ( echo Hai reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /t REG_SZ /d "" /f echo Proxy Disabled ) The output i'm getting for the Proxy Enabled part is Value Name = AutoConfigURL Value Type = REG_SZ **Value Value =yyyy** Hai The operation completed successfully. Proxy Disabled But the Proxy Enable part isn't working fine the output i get is : Value Name = AutoConfigURL Value Type = REG_SZ **Value Value =** ( was unexpected at this time. The variable "Value Value" is not getting set when we try to do the Proxy enable

    Read the article

  • ERROR: GNU libc not found!

    - by deneme
    While using make.sh command for toolchain, I encountered the following error: Checking for toolchain prerequisites Checking for GNU bash [ DONE ] Checking for GNU binutils [ DONE ] Checking for GNU bison [ DONE ] Checking for GNU bzip2 [ DONE ] Checking for GNU coreutils [ DONE ] Checking for GNU diffutils [ DONE ] Checking for GNU findutils [ DONE ] Checking for GNU awk [ DONE ] Checking for GNU CC [ DONE ] Checking for GNU libc [ FAIL ] ERROR: GNU libc not found! How can I solve this problem ?

    Read the article

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