Search Results

Search found 575 results on 23 pages for 'aaa'.

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

  • Constant Assigment Bug in Ruby?

    - by aronchick
    We caught some code in Ruby that seems odd, and I was wondering if someone could explain it: $ irb irb(main):001:0> APPLE = 'aaa' => "aaa" irb(main):002:0> banana = APPLE => "aaa" irb(main):003:0> banana << 'bbb' => "aaabbb" irb(main):004:0> banana => "aaabbb" irb(main):005:0> APPLE => "aaabbb" Catch that? The constant was appended to at the same time the local variable was. Known behavior? Expected?

    Read the article

  • change label text from a VB6 binary (not source code)

    - by Jun
    Hi, we have a VB6 binary executable that comes with no source code. And we need to change the label text for that VB6 application from "AAA" to "BBB". Is there any way or tools that can do that? The closest tool I can find right now is microsoft UISpy, it can read all the other elements but not the label. I hope there is a tool that can change the resource in the .exe so that the label "AAA" will read "BBB". Or is it possible to write a wrapper application, it will launch the .exe, examine the application screen for "AAA" and change that to "BBB"? Thank you for your help!

    Read the article

  • Using ggplot in R

    - by g256
    I have a time series cvs file like this (in var there are the values): Hour,Date,Type,val1,val2,val3,val4,val5,val6..... 0100,0153,aaa, 0100,0153,bbb, 0100,0153,ccc, 0100,0153,ddd, 0200,0153,aaa, 0200,0153,bbb, 0200,0153,ccc, 0200,0153,ddd, . . 0100,0154,aaa, 0100,0154,bbb, 0100,0154,ccc, 0100,0154,ddd, . . I would like to use ggplot to plot the barplot mean of the time series of val1,val2,... for each type. One plot for each type except for ccc and ddd that should be considered as one type, so for this I should first sum up the value, then take the mean, then plot). So three plot at the end. Thanks for advice.

    Read the article

  • python: creating a list inside a dictionary

    - by user1871081
    I just started using python and I'm trying to create a program that will read a file that looks like this: AAA x 111 AAB x 111 AAA x 112 AAC x 123 ... the file is 50 lines long and I'm trying to make the letters into keys in a dictionary and the numbers lists that correspond with the keys. I want the output to look like this: {AAA: ['111', '112'], AAB: ['111'], AAC: [123], ...} This is what I've tried file = open("filename.txt", "r") readline = file.readline().rstrip() while readline!= "": list = [] list = readline.split(" ") j = list.index("x") k = list[0:j] v = list[p + 1:] d = {} if k in d == False d[k] = [] d[k].append(v) else d[k].append(v) readline = file.readline().rstrip() I keep getting syntax errors on my if statement and I can't figure out what I've done wrong.

    Read the article

  • OpenGL ES Basic Fragment Shader help with transparency

    - by Chris
    I have just spent my first half hour playing with the shader language. I have modified the basic program I have which renders the texture, to allow me to colour the texture. varying vec2 texCoord; uniform sampler2D texSampler; /* Given the texture coordinates, our pixel shader grabs the corresponding * color from the texture. */ void main() { //gl_FragColor = texture2D(texSampler, texCoord); gl_FragColor = vec4(0,1,0,1)*vec4(texture2D(texSampler,texCoord).xyz,1); } I have noticed how this affects my transparent textures, and I believe I am loosing the alpha channel which would explain why previously transparent area's appear totally black. If I use the following line instead, I am shown the transparent area's gl_FragColor = vec4(0,1,0,1)*vec4(texture2D(texSampler,texCoord).aaa,1); How can I retain the transparency after this modification to the colour? I have seen various things about a .w property, and also luminous, but my tweaks with those and the .aaa property are not working XD

    Read the article

  • "Please ensure you have JAVA_HOME points to JDK rather than JRE" message

    - by Alex Malex
    I have java installed aaa@ubuntu:~$ whereis java java: /usr/bin/java /usr/bin/X11/java /usr/local/java /usr/share/java aaa@ubuntu:~$ whereis javac javac: /usr/bin/javac /usr/bin/X11/javac and etc/profile JAVA_HOME=/usr/local/java/jdk1.7.0_17 PATH=$PATH:$HOME/bin:$JAVA_HOME/bin JRE_HOME=/usr/local/java/jre1.7.0_17 PATH=$PATH:$HOME/bin:$JRE_HOME/bin export JAVA_HOME export JRE_HOME export PATH However, when I run Android Studio, it says: tools.jar in not in Android Studio classpath. Please ensure you have JAVA_HOME points to JDK rather than JRE. How do I fix it? update sudo update-alternatives --get-selections | grep ^java java manual /usr/local/java/jre1.7.0_17/bin/java javac manual /usr/local/java/jdk1.7.0_17/bin/javac javaws manual /usr/local/java/jre1.7.0_17/bin/javaws java -version java version "1.7.0_17"

    Read the article

  • Can't access shared drive when connecting over VPN

    - by evolvd
    I can ping all network devices but it doesn't seem that DNS is resolving their hostnames. ipconfig/ all is showing that I am pointing to the correct dns server. I can "ping "dnsname"" and it will resolve but it wont resolve any other names. Split tunnel is set up so outside DNS is resolving fine So one issue might be DNS but I have the IP address of the server share so I figure I could just get to it that way. example: \10.0.0.1\ well I can't get to it that way either and I get "the specified network name is no longer available" I can ping it but I can't open the share. Below is the ASA config : ASA Version 8.2(1) ! hostname KG-ASA domain-name example.com names ! interface Vlan1 nameif inside security-level 100 ip address 10.0.0.253 255.255.255.0 ! interface Vlan2 nameif outside security-level 0 ip address dhcp setroute ! interface Ethernet0/0 switchport access vlan 2 ! interface Ethernet0/1 ! interface Ethernet0/2 ! interface Ethernet0/3 ! interface Ethernet0/4 ! interface Ethernet0/5 ! interface Ethernet0/6 ! interface Ethernet0/7 ! ftp mode passive clock timezone EST -5 clock summer-time EDT recurring dns domain-lookup outside dns server-group DefaultDNS name-server 10.0.0.101 domain-name blah.com access-list OUTSIDE_IN extended permit tcp any host 10.0.0.253 eq 10000 access-list OUTSIDE_IN extended permit tcp any host 10.0.0.253 eq 8333 access-list OUTSIDE_IN extended permit tcp any host 10.0.0.253 eq 902 access-list SPLIT-TUNNEL-VPN standard permit 10.0.0.0 255.0.0.0 access-list NONAT extended permit ip 10.0.0.0 255.255.255.0 10.0.1.0 255.255.255.0 pager lines 24 logging asdm informational mtu inside 1500 mtu outside 1500 ip local pool IPSECVPN-POOL 10.0.1.2-10.0.1.50 mask 255.255.255.0 icmp unreachable rate-limit 1 burst-size 1 asdm image disk0:/asdm-621.bin no asdm history enable arp timeout 14400 global (outside) 1 interface nat (inside) 0 access-list NONAT nat (inside) 1 0.0.0.0 0.0.0.0 static (inside,outside) tcp interface 10000 10.0.0.101 10000 netmask 255.255.255.255 static (inside,outside) tcp interface 8333 10.0.0.101 8333 netmask 255.255.255.255 static (inside,outside) tcp interface 902 10.0.0.101 902 netmask 255.255.255.255 timeout xlate 3:00:00 timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02 timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00 timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00 timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute timeout tcp-proxy-reassembly 0:01:00 dynamic-access-policy-record DfltAccessPolicy aaa authentication enable console LOCAL aaa authentication http console LOCAL aaa authentication serial console LOCAL aaa authentication ssh console LOCAL aaa authentication telnet console LOCAL http server enable http 10.0.0.0 255.255.0.0 inside http 0.0.0.0 0.0.0.0 outside no snmp-server location no snmp-server contact snmp-server enable traps snmp authentication linkup linkdown coldstart crypto ipsec transform-set myset esp-aes esp-sha-hmac crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac crypto ipsec security-association lifetime seconds 28800 crypto ipsec security-association lifetime kilobytes 4608000 crypto dynamic-map dynmap 1 set transform-set myset crypto dynamic-map dynmap 1 set reverse-route crypto map IPSEC-MAP 65535 ipsec-isakmp dynamic dynmap crypto map IPSEC-MAP interface outside crypto isakmp enable outside crypto isakmp policy 10 authentication pre-share encryption 3des hash sha group 2 lifetime 86400 crypto isakmp policy 65535 authentication pre-share encryption aes hash sha group 2 lifetime 86400 telnet 0.0.0.0 0.0.0.0 inside telnet timeout 5 ssh 0.0.0.0 0.0.0.0 inside ssh 70.60.228.0 255.255.255.0 outside ssh 74.102.150.0 255.255.254.0 outside ssh 74.122.164.0 255.255.252.0 outside ssh timeout 5 console timeout 0 dhcpd dns 10.0.0.101 dhcpd lease 7200 dhcpd domain blah.com ! dhcpd address 10.0.0.110-10.0.0.170 inside dhcpd enable inside ! threat-detection basic-threat threat-detection statistics access-list no threat-detection statistics tcp-intercept ntp server 63.111.165.21 webvpn enable outside svc image disk0:/anyconnect-win-2.4.1012-k9.pkg 1 svc enable group-policy EASYVPN internal group-policy EASYVPN attributes dns-server value 10.0.0.101 vpn-tunnel-protocol IPSec l2tp-ipsec svc webvpn split-tunnel-policy tunnelspecified split-tunnel-network-list value SPLIT-TUNNEL-VPN ! tunnel-group client type remote-access tunnel-group client general-attributes address-pool (inside) IPSECVPN-POOL address-pool IPSECVPN-POOL default-group-policy EASYVPN dhcp-server 10.0.0.253 tunnel-group client ipsec-attributes pre-shared-key * tunnel-group CLIENTVPN type ipsec-l2l tunnel-group CLIENTVPN ipsec-attributes pre-shared-key * ! class-map inspection_default match default-inspection-traffic ! ! policy-map global_policy class inspection_default inspect icmp ! service-policy global_policy global prompt hostname context I'm not sure where I should go next with troubleshooting nslookup result: Default Server: blahname.blah.lan Address: 10.0.0.101

    Read the article

  • ASA 5540 v8.4(3) vpn to ASA 5505 v8.2(5), tunnel up but I cant ping from 5505 to IP on other side

    - by user223833
    I am having problems pinging from a 5505(remote) to IP 10.160.70.10 in the network behind the 5540(HQ side). 5505 inside IP: 10.56.0.1 Out: 71.43.109.226 5540 Inside: 10.1.0.8 out: 64.129.214.27 I Can ping from 5540 to 5505 inside 10.56.0.1. I also ran ASDM packet tracer in both directions, it is ok from 5540 to 5505, but drops the packet from 5505 to 5540. It gets through the ACL and dies at the NAT. Here is the 5505 config, I am sure it is something simple I am missing. ASA Version 8.2(5) ! hostname ASA-CITYSOUTHDEPOT domain-name rngint.net names ! interface Ethernet0/0 switchport access vlan 2 ! interface Ethernet0/1 ! interface Ethernet0/2 ! interface Ethernet0/3 ! interface Ethernet0/4 ! interface Ethernet0/5 ! interface Ethernet0/6 ! interface Ethernet0/7 ! interface Vlan1 nameif inside security-level 100 ip address 10.56.0.1 255.255.0.0 ! interface Vlan2 nameif outside security-level 0 ip address 71.43.109.226 255.255.255.252 ! banner motd ***ASA-CITYSOUTHDEPOT*** banner asdm CITY SOUTH DEPOT ASA5505 ftp mode passive clock timezone EST -5 clock summer-time EDT recurring dns server-group DefaultDNS domain-name rngint.net access-list outside_1_cryptomap extended permit ip host 71.43.109.226 host 10.1.0.125 access-list outside_1_cryptomap extended permit ip 10.56.0.0 255.255.0.0 10.0.0.0 255.0.0.0 access-list outside_1_cryptomap extended permit ip 10.56.0.0 255.255.0.0 10.106.70.0 255.255.255.0 access-list outside_1_cryptomap extended permit ip 10.56.0.0 255.255.0.0 10.106.130.0 255.255.255.0 access-list outside_1_cryptomap extended permit ip host 71.43.109.226 host 10.160.70.10 access-list inside_nat0_outbound extended permit ip host 71.43.109.226 host 10.1.0.125 access-list inside_nat0_outbound extended permit ip 10.56.0.0 255.255.0.0 10.0.0.0 255.0.0.0 access-list inside_nat0_outbound extended permit ip 10.56.0.0 255.255.0.0 10.106.130.0 255.255.255.0 access-list inside_nat0_outbound extended permit ip 10.56.0.0 255.255.0.0 10.106.70.0 255.255.255.0 access-list inside_nat0_outbound extended permit ip host 71.43.109.226 10.106.70.0 255.255.255.0 pager lines 24 logging enable logging buffer-size 25000 logging buffered informational logging asdm warnings mtu inside 1500 mtu outside 1500 icmp unreachable rate-limit 1 burst-size 1 icmp permit any inside no asdm history enable arp timeout 14400 global (outside) 1 interface nat (inside) 0 access-list inside_nat0_outbound nat (inside) 1 0.0.0.0 0.0.0.0 route outside 0.0.0.0 0.0.0.0 71.43.109.225 1 timeout xlate 3:00:00 timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02 timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00 timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00 timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute timeout tcp-proxy-reassembly 0:01:00 timeout floating-conn 0:00:00 dynamic-access-policy-record DfltAccessPolicy aaa-server TACACS+ protocol tacacs+ aaa-server TACACS+ (inside) host 10.106.70.36 key ***** aaa authentication http console LOCAL aaa authentication ssh console LOCAL aaa authorization exec authentication-server http server enable http 192.168.1.0 255.255.255.0 inside http 10.0.0.0 255.0.0.0 inside http 0.0.0.0 0.0.0.0 outside snmp-server host inside 10.106.70.7 community ***** no snmp-server location no snmp-server contact snmp-server community ***** snmp-server enable traps snmp authentication linkup linkdown coldstart crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac crypto ipsec transform-set ESP-AES-128-SHA esp-aes esp-sha-hmac crypto ipsec transform-set ESP-AES-128-MD5 esp-aes esp-md5-hmac crypto ipsec transform-set ESP-AES-192-SHA esp-aes-192 esp-sha-hmac crypto ipsec transform-set ESP-AES-192-MD5 esp-aes-192 esp-md5-hmac crypto ipsec transform-set ESP-AES-256-SHA esp-aes-256 esp-sha-hmac crypto ipsec transform-set ESP-AES-256-MD5 esp-aes-256 esp-md5-hmac crypto ipsec transform-set ESP-3DES-MD5 esp-3des esp-md5-hmac crypto ipsec transform-set ESP-DES-SHA esp-des esp-sha-hmac crypto ipsec transform-set ESP-DES-MD5 esp-des esp-md5-hmac crypto ipsec security-association lifetime seconds 28800 crypto ipsec security-association lifetime kilobytes 4608000 crypto map outside_map 1 match address outside_1_cryptomap crypto map outside_map 1 set pfs group1 crypto map outside_map 1 set peer 64.129.214.27 crypto map outside_map 1 set transform-set ESP-3DES-SHA crypto map outside_map interface outside crypto isakmp enable outside crypto isakmp policy 1 authentication pre-share encryption des hash md5 group 2 lifetime 86400 telnet timeout 5 ssh 10.0.0.0 255.0.0.0 inside ssh 0.0.0.0 0.0.0.0 outside ssh timeout 5 console timeout 0 management-access inside dhcpd auto_config outside ! dhcpd address 10.56.0.100-10.56.0.121 inside dhcpd dns 10.1.0.125 interface inside dhcpd auto_config outside interface inside ! dhcprelay server 10.1.0.125 outside dhcprelay enable inside dhcprelay setroute inside dhcprelay timeout 60 threat-detection basic-threat threat-detection statistics access-list no threat-detection statistics tcp-intercept tftp-server inside 10.1.1.25 CITYSOUTHDEPOT-ASA-Confg webvpn tunnel-group 64.129.214.27 type ipsec-l2l tunnel-group 64.129.214.27 ipsec-attributes pre-shared-key ***** ! ! prompt hostname context

    Read the article

  • SQL*Plus??? - SPOOL??????????? (????? ???Tips-4)

    - by Yuichi.Hayashi
    SPOOL????????????????????? SQL*Plus?????10.1??? ????????????????????????????? ??:spool ??????? { cre[ate] | rep[lace] | app[end] } ??????replace??????????????????????????? ? ???????????????????????? ????10.1???????? ???create?append???????????????? create????? create??????????????????? ???????????? SQL spool aaa.txt cre SP2-0771: ????"aaa.txt"?????????? ???????"SPOOL filename[.ext] REPLACE"???????????spool??????????? append????? append???????????????????? ????????????????????????? ??v$??????????????????????????????????????????????????? ?)spool???????????????????????????????????????? (Written by Hiroyuki Nakaie)

    Read the article

  • How can give group in active directory folder access by group policy

    - by AAA-Super
    I have windows server 2003 64bit and my clients running on windows xp 32bit. My clients have user rights so they can't install any program. I have some programs needs admin rights for example I have French dictionary without admin right the program will not work properly. I don't want go to each PC and login with admin account then go to program folder located in programs files to give full permission to the group. Is there a way to add them folder in group policy so I can force all the PCs to have full access on the folder? Thanks you in advance.

    Read the article

  • How is a subdomain passed to the webserver?

    - by Joshua Frank
    I know that dns resolves an address like example.com to an IP address like 11.22.33.44, but I'm a little confused about how subdomains are resolved, so that when you type http://subdomain.example.com, what actually gets passed to the server at 11.22.33.44? In other words, example.com = 11.22.33.44, but subdomain.example.com/path = ??? Are "subdomain" and "path" passed as http headers, or mapped in the url in some way, or what? Thanks in advance. Edit: If I'm understanding correctly, BloodPhilia says that subdomain.example.com actually is a different domain that in principle could resolve to a totally different IP. But if that's so, then what about hosts that have huge numbers of (what look like) subdomains, but which actually map to some path on the site. For instance, blogspot hosts millions of blogs, and they all look like this: aaa.blogspot.com bbb.blogspot.com ...millions more... yyy.blogspot.com zzz.blogspot.com Those are clearly not subdomains with their own IP's, but rather some mapping like aaa.blogspot.com -- www.blogspot.com/aaa, but how is this accomplished? What actually gets passed to the web server at blogspot.com?

    Read the article

  • LaserJet M1522nF firmware was corrupted during the update

    - by AAA-Super
    I have a LaserJet M1522nF, and the problem when I working on is that it is freezing every time so I decide to update the firmware. During the updating the device was down because of electricity so I turned it on again and there is a message on the small screen saing HEWLETT-PACKARD After nothing appeared on screen the device seems to be blocked or the firmware was corrupted. Now, how can I reset the update of firmware or how can I reinstall it?

    Read the article

  • convert home phone wiring to Ethernet

    - by aaa
    can i convert phone wiring in walls to act as only Ethernet network cause the phone wiring is not in use and not connected to the phone company so there is no voltage in the wires i remove the wall plate and i find 6 wires blue,blue/white,green,green/white,orange,orange/white , and i know that Ethernet use 8 here is what i am thinking get Ethernet cable cut it in half and attach wires from wall to the first computer and the same with the other computer so if this is possible do i just attach wires in the same color and ignore brown wire or do i have to rearrange wires , and how much the speed will be thank you in advance

    Read the article

  • convert home phone wiring to Ethernet

    - by aaa
    can i convert phone wiring in walls to act as only Ethernet network cause the phone wiring is not in use and not connected to the phone company so there is no voltage in the wires i remove the wall plate and i find 6 wires blue,blue/white,green,green/white,orange,orange/white , and i know that Ethernet use 8 here is what i am thinking get Ethernet cable cut it in half and attach wires from wall to the first computer and the same with the other computer so if this is possible do i just attach wires in the same color and ignore brown wire or do i have to rearrange wires , and how much the speed will be thank you in advance

    Read the article

  • Can the users can apply Windows update without local administrator rights?

    - by AAA-Super
    My users are running on windows XP 32bit. normally WSUS automatically download and notify them to select which update want to install in the past they were in local administrator rights,now I reduce them to user rights so now they can't see the yellow notification said updated are available. Is there a way to give users permission to see the yellow notification and they can select updates by hand without local admin rights or power users? Any advice would be appreciated Thanks

    Read the article

  • Relative path incorrect in the view layer when hosting a rails3 app in a subdirectory using passenger and apache

    - by Saifis
    I want to host multiple Rails apps on a multiple server using sub-directories. And have encountered some relative path problems. I have made a symbolic link to the app's public directory and placed it in the /var/www/html directory, var/www/html/ /test_app (symbolic link to the public folder of test_app) and set apache as so LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.12/ext/apache2/mod_passenger.so PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.12 PassengerRuby /usr/local/bin/ruby <VirtualHost *:80> ServerName test.com DocumentRoot /var/www/html Options Indexes FollowSymLinks -MultiViews RailsBaseURI /test_app </Location> </VirtualHost> The links in the app itself works just fine, all the links acknowledge the test_app/ directory and work, however, when it comes to showing images in the public directory in the view, the relative path goes wrong. Say I have /system/files/1/aaa.png it goes looking for it in /var/www/html/system/files/1/aaa.png rather than /var/www/html/test_app/system/files/1/aaa.png As far as I understand this is an Apache setting problem than something to be done in Rails, if its possible I would prefer to have it contained in the conf file of apache rather than having to alter the code.

    Read the article

  • starting command automaticaly [closed]

    - by aaa
    playing with Debian on raspberry pi. I have a 3g dongle modem on the system and there is a software called sakis3g to connect to internet. I want system to connect to internet automatically every time it starts. It takes about 30-40 seconds to get connected. copied sakis3g to /sbin folder. This command has to be run as root: sakis3g connect parameters blah blah blah I tried to put it in the /etc/rc.local and rebooted system, but no luck. I tried to put it in the crontab as: @reboot sakis3g connect parameters blah blah blah What am I missing here?

    Read the article

  • Server not repsonding after Ubuntu upgrade

    - by aaa
    I have a server that was running Ubuntu 8.04. I upgraded Ubuntu via the command-line and got no warning messages. After it was done the server restarted but now I am unable to SSH back in. My site is also not resolving. My guess is I overwrote something important. What are some trouble-shooting steps I can take? I am able to execute commands through my VPS provider's admin interface. I'm not sure what version it upgraded me to honestly.

    Read the article

  • Code Golf - Banner Generation

    - by Claudiu
    When thanking someone, you don't want to just send them an e-mail saying "Thanks!", you want to have something FLASHY: Input: THANKS!! Output: TTT H H AAA N N K K SSS !!! !!! T H H A A NNN K K S !!! !!! T HHH AAA NNN KK SSS !!! !!! T H H A A N N K K S T H H A A N N K K SSS !!! !!! Write a program to generate a banner. You only have to generate upper-case A-Z along with spaces and exclamation points (what is a banner without an exclamation point?). All characters are made up of a 3x5 grid of the same character (so the S is a 3x5 grid made of S). All output should be on one row (so no newlines). Here are all the letters you need: Input: ABCDEFGHIJKL Output: AAA BBB CCC DD EEE FFF GGG H H III JJJ K K L A A B B C D D E F G H H I J K K L AAA BBB C D D EE FF G G HHH I J KK L A A B B C D D E F G G H H I J J K K L A A BBB CCC DD EEE F GGG H H III JJJ K K LLL Input: MNOPQRSTUVWX Output: M M N N OOO PPP QQQ RR SSS TTT U U V V W W X X MMM NNN O O P P Q Q R R S T U U V V W W X M M NNN O O PPP Q Q RR SSS T U U V V WWW X M M N N O O P QQQ R R S T U U V V WWW X M M N N OOO P QQQ R R SSS T UUU V WWW X X Input: YZ! Output: Y Y ZZZ !!! Y Y Z !!! YYY Z !!! Y Z YYY ZZZ !!! The winner is the shortest source code. Source code should read input from stdin, output to stdout. You can assume input will only contain [A-Z! ]. If you insult the user on incorrect input, you get a 10 character discount =P. I was going to require these exact 27 characters, but to make it more interesting, you can choose how you want them to look - whatever makes your code shorter! To prove that your letters do look like normal letters, show the output of the last three runs.

    Read the article

  • A question about complex SQL statement

    - by william
    Table A has columns ID and AName, Table B has columns BName and ID. B.ID is foreign key of A.ID. Write a SQL statement to show data like: print column AName and C which describe whether Table B has ID in Table A, if exists 1 or else 0. So if A is: 1 aaa 2 bbb B is: something,2 output is: aaa,0 bbb,1

    Read the article

  • How to add an additional column in a table by comparing the values in a different column

    - by S-Man
    I have a table with the following records id name city 1 aaa NY 2 bbb NY 3 ccc LA 4 ddd LA 5 eee NY I want the table with an additional column by comparing the 'city' column. The values in the col4 should have '1' for every unique value in 'city' column and '0' for the repeating values in 'city' column. id name city col4 1 aaa NY 1 2 bbb NY 0 3 ccc LA 1 4 ddd LA 0 5 eee NY 0 I hope to get some help. Thanks

    Read the article

  • replace only one variable in web.py templates

    - by Asterisk
    I am passing variable to template in web.py and have the same condition in some places. Like this: $if myvar=="string1": $passed argument1 ............ $if myvar =="striung2": $passed argument2 If say myvar is "string1" and I pass passed = "AAA" then I have AAA argument1 on my page, but the other if statements get replaced by empty string? How to avoid that? I.e. how to leave other statements intact?

    Read the article

  • Unintentional concatenation in Bison/Yacc grammar.

    - by troutwine
    I am experimenting with lex and yacc and have run into a strange issue, but I think it would be best to show you my code before detailing the issue. This is my lexer: %{ #include <stdlib.h> #include <string.h> #include "y.tab.h" void yyerror(char *); %} %% [a-zA-Z]+ { yylval.strV = yytext; return ID; } [0-9]+ { yylval.intV = atoi(yytext); return INTEGER; } [\n] { return *yytext; } [ \t] ; . yyerror("invalid character"); %% int yywrap(void) { return 1; } This is my parser: %{ #include <stdio.h> int yydebug=1; void prompt(); void yyerror(char *); int yylex(void); %} %union { int intV; char *strV; } %token INTEGER ID %% program: program statement EOF { prompt(); } | program EOF { prompt(); } | { prompt(); } ; args: /* empty */ | args ID { printf(":%s ", $<strV>2); } ; statement: ID args { printf("%s", $<strV>1); } | INTEGER { printf("%d", $<intV>1); } ; EOF: '\n' %% void yyerror(char *s) { fprintf(stderr, "%s\n", s); } void prompt() { printf("> "); } int main(void) { yyparse(); return 0; } A very simple language, consisting of no more than strings and integer and a basic REPL. Now, you'll note in the parser that args are output with a leading colon, the intention being that, when combined with the first pattern of the rule of the statement the interaction with the REPL would look something like this: > aaa aa a :aa :a aaa> However, the interaction is this: > aaa aa a :aa :a aaa aa aa > Why does the token ID in the following rule statement: ID args { printf("%s", $<strV>1); } | INTEGER { printf("%d", $<intV>1); } ; have the semantic value of the total input string, newline included? How can my grammar be reworked so that the interaction I intended?

    Read the article

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