Search Results

Search found 344 results on 14 pages for 'e rock'.

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

  • OUG Ireland Conference 2011 Rock Star Attendance *

    - by ultan o'broin
    Yes folks, the Oracle User Group (OUG) Ireland Conference is almost upon us again, synch your calendars up for Wednesday 30-Mar-2011 (how do you like that NLS-compliant date format?), in the Aviva Stadium (that's “Landsdowne Road” to most of us locals) in Dublin. So come along and take in the best of local knowledge, listen to world-leading speakers, and hear customer stories of interest to the Irish Oracle community. And see me. There will be a keynote presentation by Paul O’Riordan, Technology Director and Country Leader, Oracle Ireland and over 20 sessions to choose from, including ones on Oracle Fusion Applications, Oracle E-Business Suite, Fusion Middleware, SQL, Apex, and Business Intelligence. I can't wait for the sessions on Fusion Applications by Liam Nolan and Fusion Middleware and Apps by Debra Lilley. I will also be there if you have any follow-up questions about the Oracle Fusion Applications user experience (UX), how the UX team works, and what the UX means for how you work.  So don't be shy. I'll also try and tweet my observations from the day as we go along. You can follow me (@ultan) or the hashtag #oug_ire11. Note that end users and students (that's you lot) can attend the conference for free. Full sign-up details for all are on the OUG Ireland website. * Yes, I know Michael Bublé played there. Put that behind you, this will be much cooler. Technorati Tags: Oracle Fusion Applications,Fusion,UX,user experience,OUG,E-Business Suite,Apex,SQL,Middleware

    Read the article

  • Wanna be a Rock Star?

    - by lydia.smyers
    We just launched the Oracle PartnerNetwork Specialized Partner Premier site, a new site specifically targeted to customers, partners and Oracle employees. The site is all about "You", our partners, who have achieved one or more of the over 50 specializations available today. Specialized. Recognized. Preferred. Yes, that's you - the chosen vendors. And just for you we're going to produce videos starring "You" and your stories which will available everywhere Oracle customers, partners and employees are. Sundance may be over but we're just getting started. This is just one of the new benefits, want more? Industry Analyst Firm, IDC offers kudos and says Oracle's premier "approach to putting top partners front and center with customers and prospects" has "raised the bar." We'll be advertising this site all over Oracle's major websites to give our specialized partners their deserved recognition. Bring on the buttered popcorn! Lights! Camera! What are you waiting for? http://www.oracle.com/specialized. Need to get specialized? Check out how: http://www.oracle.com/partners/en/opn-program/specialize/index.html

    Read the article

  • One-liner to determine who wins in Rock, Paper, Scissors

    - by asmeurer
    So I am writing a simple Rock, Paper, Scissors game in C (it's for an assignment by the way, though the main thing is to learn sockets. Also, I suspect it will be due before I get a good answer). I have it setup as Rock=0, Paper=1, and Scissors=2. Is there an easy one-liner to determine who wins? I tried playing around with it on paper, but I couldn't figure out any patterns.

    Read the article

  • How can one describe a rock-paper-scissors relationship between 3 items?

    - by Madara Uchiha
    Let's say I have the following structure: abstract class Hand {} class Rock extends Hand {} class Paper extends Hand {} class Scissors extends Hand {} The goal is to make a function (or a method) Hand::compareHands(Hand $hand1, Hand $hand2), which would return the winning hand in a rock-paper-scissors match. That would be very easy with a bunch of ifs, but the point is to have a more robust structure, that's relying on polymorphism rather than on procedural code. P.S. this is done in actual production code, if someone is asking. This isn't some sort of challenge or homework. (It's not really rock-paper-scissors, but you get the point).

    Read the article

  • Rock Stars and now OPN All-Stars? Bring it.

    - by sandra.haan
    We are talking everything OPN All-Star - from home-court advantage to taking too many shots across a wide variety of industries, skill sets, focus areas, broad solution sets, applications and technologies. As a Platinum Partner, Intelenex levels of quality specialization range from ERP/EBS, CRM, AIA to Hyperion. Slam dunk! This is what gives Intelenex a well deserved star studded "baller" celebrity status like the LA Lakers very own Kobe Bryant. While Intelenex has been busy multi-specializing and taking names, Tyler Prince, group vp, North America Sales tells us a little bit about the value OPN's overall strategy brings to the table. This exclusive partnership allows OPN Specialized partners to provide customers with a solution that helps them adapt swiftly to new expansion conditions and changes. Namely, partners can pick an area to focus and can leverage that focus and competency to differentiate from the competition. You will be so HOT on the OPN court the Miami Heat will have nothing on you. Watch out, Lebron. Additionally, this specialization in products or set of products is recognized by the entire Oracle sales force, which is vital to all partners, but most importantly your end-customers. You will be so stylishly famous your cheerleader squad will not be able to steal the spotlight from you. Are you really All-Star worthy this season? Jump in and join Tyler's halftime report on OPN's All-Star program in this VAR Guy FastChat video to find out: Now that's what we call some March Madness - Good selling, The OPN Communications Team

    Read the article

  • Using Hidden Markov Model for designing AI mp3 player

    - by Casper Slynge
    Hey guys. Im working on an assignment, where I want to design an AI for a mp3 player. The AI must be trained and designed with the use of a HMM method. The mp3 player shall have the functionality of adapting to its user, by analyzing incoming biological sensor data, and from this data the mp3 player will choose a genre for the next song. Given in the assignment is 14 samples of data: One sample consist of Heart Rate, Respiration, Skin Conductivity, Activity and finally the output genre. Below is the 14 samples of data, just for you to get an impression of what im talking about. Sample HR RSP SC Activity Genre S1 Medium Low High Low Rock S2 High Low Medium High Rock S3 High High Medium Low Classic S4 High Medium Low Medium Classic S5 Medium Medium Low Low Classic S6 Medium Low High High Rock S7 Medium High Medium Low Classic S8 High Medium High Low Rock S9 High High Low Low Classic S10 Medium Medium Medium Low Classic S11 Medium Medium High High Rock S12 Low Medium Medium High Classic S13 Medium High Low Low Classic S14 High Low Medium High Rock My time of work regarding HMM is quite low, so my question to you is if I got the right angle on the assignment. I have three different states for each sensor: Low, Medium, High. Two observations/output symbols: Rock, Classic In my own opinion I see my start probabilities as the weightened factors for either a Low, Medium or High state in the Heart Rate. So the ideal solution for the AI is that it will learn these 14 sets of samples. And when a users sensor input is received, the AI will compare the combination of states for all four sensors, with the already memorized samples. If there exist a matching combination, the AI will choose the genre, and if not it will choose a genre according to the weightened transition probabilities, while simultaniously updating the transition probabilities with the new data. Is this a right approach to take, or am I missing something ? Is there another way to determine the output probability (read about Maximum likelihood estimation by EM, but dont understand the concept)? Best regards, Casper

    Read the article

  • Add collison detection to enemy sprites?

    - by xBroak
    i'd like to add the same collision detection used by the player sprite to the enemy sprites or 'creeps' ive added all the relevant code I can see yet collisons are still not being detected and handled, please find below the class, I have no idea what is wrong currently, the list of walls to collide with is 'wall_list' import pygame import pauseScreen as dm import re from pygame.sprite import Sprite from pygame import Rect, Color from random import randint, choice from vec2d import vec2d from simpleanimation import SimpleAnimation import displattxt black = (0,0,0) white = (255,255,255) blue = (0,0,255) green = (101,194,151) global currentEditTool currentEditTool = "Tree" global editMap editMap = False open('MapMaker.txt', 'w').close() def draw_background(screen, tile_img): screen.fill(black) img_rect = tile_img.get_rect() global rect rect = img_rect nrows = int(screen.get_height() / img_rect.height) + 1 ncols = int(screen.get_width() / img_rect.width) + 1 for y in range(nrows): for x in range(ncols): img_rect.topleft = (x * img_rect.width, y * img_rect.height) screen.blit(tile_img, img_rect) def changeTool(): if currentEditTool == "Tree": None elif currentEditTool == "Rock": None def pauseGame(): red = 255, 0, 0 green = 0,255, 0 blue = 0, 0,255 screen.fill(black) pygame.display.update() if editMap == False: choose = dm.dumbmenu(screen, [ 'Resume', 'Enable Map Editor', 'Quit Game'], 64,64,None,32,1.4,green,red) if choose == 0: print("hi") elif choose ==1: global editMap editMap = True elif choose ==2: print("bob") elif choose ==3: print("bob") elif choose ==4: print("bob") else: None else: choose = dm.dumbmenu(screen, [ 'Resume', 'Disable Map Editor', 'Quit Game'], 64,64,None,32,1.4,green,red) if choose == 0: print("Resume") elif choose ==1: print("Dis ME") global editMap editMap = False elif choose ==2: print("bob") elif choose ==3: print("bob") elif choose ==4: print("bob") else: None class Wall(pygame.sprite.Sprite): # Constructor function def __init__(self,x,y,width,height): pygame.sprite.Sprite.__init__(self) self.image = pygame.Surface([width, height]) self.image.fill(green) self.rect = self.image.get_rect() self.rect.y = y self.rect.x = x class insertTree(pygame.sprite.Sprite): def __init__(self,x,y,width,height, typ): pygame.sprite.Sprite.__init__(self) self.image = pygame.image.load("images/map/tree.png").convert() self.image.set_colorkey(white) self.rect = self.image.get_rect() self.rect.y = y self.rect.x = x class insertRock(pygame.sprite.Sprite): def __init__(self,x,y,width,height, typ): pygame.sprite.Sprite.__init__(self) self.image = pygame.image.load("images/map/rock.png").convert() self.image.set_colorkey(white) self.rect = self.image.get_rect() self.rect.y = y self.rect.x = x class Creep(pygame.sprite.Sprite): """ A creep sprite that bounces off walls and changes its direction from time to time. """ change_x=0 change_y=0 def __init__( self, screen, creep_image, explosion_images, field, init_position, init_direction, speed): """ Create a new Creep. screen: The screen on which the creep lives (must be a pygame Surface object, such as pygame.display) creep_image: Image (surface) object for the creep explosion_images: A list of image objects for the explosion animation. field: A Rect specifying the 'playing field' boundaries. The Creep will bounce off the 'walls' of this field. init_position: A vec2d or a pair specifying the initial position of the creep on the screen. init_direction: A vec2d or a pair specifying the initial direction of the creep. Must have an angle that is a multiple of 45 degres. speed: Creep speed, in pixels/millisecond (px/ms) """ Sprite.__init__(self) self.screen = screen self.speed = speed self.field = field self.rect = creep_image.get_rect() # base_image holds the original image, positioned to # angle 0. # image will be rotated. # self.base_image = creep_image self.image = self.base_image self.explosion_images = explosion_images # A vector specifying the creep's position on the screen # self.pos = vec2d(init_position) # The direction is a normalized vector # self.direction = vec2d(init_direction).normalized() self.state = Creep.ALIVE self.health = 15 def is_alive(self): return self.state in (Creep.ALIVE, Creep.EXPLODING) def changespeed(self,x,y): self.change_x+=x self.change_y+=y def update(self, time_passed, walls): """ Update the creep. time_passed: The time passed (in ms) since the previous update. """ if self.state == Creep.ALIVE: # Maybe it's time to change the direction ? # self._change_direction(time_passed) # Make the creep point in the correct direction. # Since our direction vector is in screen coordinates # (i.e. right bottom is 1, 1), and rotate() rotates # counter-clockwise, the angle must be inverted to # work correctly. # self.image = pygame.transform.rotate( self.base_image, -self.direction.angle) # Compute and apply the displacement to the position # vector. The displacement is a vector, having the angle # of self.direction (which is normalized to not affect # the magnitude of the displacement) # displacement = vec2d( self.direction.x * self.speed * time_passed, self.direction.y * self.speed * time_passed) self.pos += displacement # When the image is rotated, its size is changed. # We must take the size into account for detecting # collisions with the walls. # self.image_w, self.image_h = self.image.get_size() bounds_rect = self.field.inflate( -self.image_w, -self.image_h) if self.pos.x < bounds_rect.left: self.pos.x = bounds_rect.left self.direction.x *= -1 elif self.pos.x > bounds_rect.right: self.pos.x = bounds_rect.right self.direction.x *= -1 elif self.pos.y < bounds_rect.top: self.pos.y = bounds_rect.top self.direction.y *= -1 elif self.pos.y > bounds_rect.bottom: self.pos.y = bounds_rect.bottom self.direction.y *= -1 # collision detection old_x=bounds_rect.left new_x=old_x+self.direction.x bounds_rect.left = new_x # hit a wall? collide = pygame.sprite.spritecollide(self, walls, False) if collide: # yes bounds_rect.left=old_x old_y=self.pos.y new_y=old_y+self.direction.y self.pos.y = new_y collide = pygame.sprite.spritecollide(self, walls, False) if collide: # yes self.pos.y=old_y elif self.state == Creep.EXPLODING: if self.explode_animation.active: self.explode_animation.update(time_passed) else: self.state = Creep.DEAD self.kill() elif self.state == Creep.DEAD: pass #------------------ PRIVATE PARTS ------------------# # States the creep can be in. # # ALIVE: The creep is roaming around the screen # EXPLODING: # The creep is now exploding, just a moment before dying. # DEAD: The creep is dead and inactive # (ALIVE, EXPLODING, DEAD) = range(3) _counter = 0 def _change_direction(self, time_passed): """ Turn by 45 degrees in a random direction once per 0.4 to 0.5 seconds. """ self._counter += time_passed if self._counter > randint(400, 500): self.direction.rotate(45 * randint(-1, 1)) self._counter = 0 def _point_is_inside(self, point): """ Is the point (given as a vec2d) inside our creep's body? """ img_point = point - vec2d( int(self.pos.x - self.image_w / 2), int(self.pos.y - self.image_h / 2)) try: pix = self.image.get_at(img_point) return pix[3] > 0 except IndexError: return False def _decrease_health(self, n): """ Decrease my health by n (or to 0, if it's currently less than n) """ self.health = max(0, self.health - n) if self.health == 0: self._explode() def _explode(self): """ Starts the explosion animation that ends the Creep's life. """ self.state = Creep.EXPLODING pos = ( self.pos.x - self.explosion_images[0].get_width() / 2, self.pos.y - self.explosion_images[0].get_height() / 2) self.explode_animation = SimpleAnimation( self.screen, pos, self.explosion_images, 100, 300) global remainingCreeps remainingCreeps-=1 if remainingCreeps == 0: print("all dead") def draw(self): """ Blit the creep onto the screen that was provided in the constructor. """ if self.state == Creep.ALIVE: # The creep image is placed at self.pos. To allow for # smooth movement even when the creep rotates and the # image size changes, its placement is always # centered. # self.draw_rect = self.image.get_rect().move( self.pos.x - self.image_w / 2, self.pos.y - self.image_h / 2) self.screen.blit(self.image, self.draw_rect) # The health bar is 15x4 px. # health_bar_x = self.pos.x - 7 health_bar_y = self.pos.y - self.image_h / 2 - 6 self.screen.fill( Color('red'), (health_bar_x, health_bar_y, 15, 4)) self.screen.fill( Color('green'), ( health_bar_x, health_bar_y, self.health, 4)) elif self.state == Creep.EXPLODING: self.explode_animation.draw() elif self.state == Creep.DEAD: pass def mouse_click_event(self, pos): """ The mouse was clicked in pos. """ if self._point_is_inside(vec2d(pos)): self._decrease_health(3) #begin new player class Player(pygame.sprite.Sprite): change_x=0 change_y=0 frame = 0 def __init__(self,x,y): pygame.sprite.Sprite.__init__(self) # LOAD PLATER IMAGES # Set height, width self.images = [] for i in range(1,17): img = pygame.image.load("images/player/" + str(i)+".png").convert() #player images img.set_colorkey(white) self.images.append(img) self.image = self.images[0] self.rect = self.image.get_rect() self.rect.y = y self.rect.x = x self.health = 15 self.image_w, self.image_h = self.image.get_size() health_bar_x = self.rect.x - 7 health_bar_y = self.rect.y - self.image_h / 2 - 6 screen.fill( Color('red'), (health_bar_x, health_bar_y, 15, 4)) screen.fill( Color('green'), ( health_bar_x, health_bar_y, self.health, 4)) def changespeed(self,x,y): self.change_x+=x self.change_y+=y def _decrease_health(self, n): """ Decrease my health by n (or to 0, if it's currently less than n) """ self.health = max(0, self.health - n) if self.health == 0: self._explode() def update(self,walls): # collision detection old_x=self.rect.x new_x=old_x+self.change_x self.rect.x = new_x # hit a wall? collide = pygame.sprite.spritecollide(self, walls, False) if collide: # yes self.rect.x=old_x old_y=self.rect.y new_y=old_y+self.change_y self.rect.y = new_y collide = pygame.sprite.spritecollide(self, walls, False) if collide: # yes self.rect.y=old_y # right to left if self.change_x < 0: self.frame += 1 if self.frame > 3*4: self.frame = 0 # Grab the image, divide by 4 # every 4 frames. self.image = self.images[self.frame//4] # Move left to right. # images 4...7 instead of 0...3. if self.change_x > 0: self.frame += 1 if self.frame > 3*4: self.frame = 0 self.image = self.images[self.frame//4+4] if self.change_y > 0: self.frame += 1 if self.frame > 3*4: self.frame = 0 self.image = self.images[self.frame//4+4+4] if self.change_y < 0: self.frame += 1 if self.frame > 3*4: self.frame = 0 self.image = self.images[self.frame//4+4+4+4] score = 0 # initialize pyGame pygame.init() # 800x600 sized screen global screen screen = pygame.display.set_mode([800, 600]) screen.fill(black) #bg_tile_img = pygame.image.load('images/map/grass.png').convert_alpha() #draw_background(screen, bg_tile_img) #pygame.display.flip() # Set title pygame.display.set_caption('Test') #background = pygame.Surface(screen.get_size()) #background = background.convert() #background.fill(black) # Create the player player = Player( 50,50 ) player.rect.x=50 player.rect.y=50 movingsprites = pygame.sprite.RenderPlain() movingsprites.add(player) # Make the walls. (x_pos, y_pos, width, height) global wall_list wall_list=pygame.sprite.RenderPlain() wall=Wall(0,0,10,600) # left wall wall_list.add(wall) wall=Wall(10,0,790,10) # top wall wall_list.add(wall) #wall=Wall(10,200,100,10) # poke wall wall_list.add(wall) wall=Wall(790,0,10,600) #(x,y,thickness, height) wall_list.add(wall) wall=Wall(10,590,790,10) #(x,y,thickness, height) wall_list.add(wall) f = open('MapMaker.txt') num_lines = sum(1 for line in f) print(num_lines) lineCount = 0 with open("MapMaker.txt") as infile: for line in infile: f = open('MapMaker.txt') print(line) coords = line.split(',') #print(coords[0]) #print(coords[1]) #print(coords[2]) #print(coords[3]) #print(coords[4]) if "tree" in line: print("tree in") wall=insertTree(int(coords[0]),int(coords[1]), int(coords[2]),int(coords[3]),coords[4]) wall_list.add(wall) elif "rock" in line: print("rock in") wall=insertRock(int(coords[0]),int(coords[1]), int(coords[2]),int(coords[3]),coords[4] ) wall_list.add(wall) width = 20 height = 540 height = height - 48 for i in range(0,23): width = width + 32 name = insertTree(width,540,790,10,"tree") #wall_list.add(name) name = insertTree(width,height,690,10,"tree") #wall_list.add(name) CREEP_SPAWN_TIME = 200 # frames creep_spawn = CREEP_SPAWN_TIME clock = pygame.time.Clock() bg_tile_img = pygame.image.load('images/map/grass.png').convert() img_rect = bg_tile_img FIELD_RECT = Rect(50, 50, 700, 500) CREEP_FILENAMES = [ 'images/player/1.png', 'images/player/1.png', 'images/player/1.png'] N_CREEPS = 3 creep_images = [ pygame.image.load(filename).convert_alpha() for filename in CREEP_FILENAMES] explosion_img = pygame.image.load('images/map/tree.png').convert_alpha() explosion_images = [ explosion_img, pygame.transform.rotate(explosion_img, 90)] creeps = pygame.sprite.RenderPlain() done = False #bg_tile_img = pygame.image.load('images/map/grass.png').convert() #draw_background(screen, bg_tile_img) totalCreeps = 0 remainingCreeps = 3 while done == False: creep_images = pygame.image.load("images/player/1.png").convert() creep_images.set_colorkey(white) draw_background(screen, bg_tile_img) if len(creeps) != N_CREEPS: if totalCreeps < N_CREEPS: totalCreeps = totalCreeps + 1 print(totalCreeps) creeps.add( Creep( screen=screen, creep_image=creep_images, explosion_images=explosion_images, field=FIELD_RECT, init_position=( randint(FIELD_RECT.left, FIELD_RECT.right), randint(FIELD_RECT.top, FIELD_RECT.bottom)), init_direction=(choice([-1, 1]), choice([-1, 1])), speed=0.01)) for creep in creeps: creep.update(60,wall_list) creep.draw() for event in pygame.event.get(): if event.type == pygame.QUIT: done=True if event.type == pygame.KEYDOWN: if event.key == pygame.K_LEFT: player.changespeed(-2,0) creep.changespeed(-2,0) if event.key == pygame.K_RIGHT: player.changespeed(2,0) creep.changespeed(2,0) if event.key == pygame.K_UP: player.changespeed(0,-2) creep.changespeed(0,-2) if event.key == pygame.K_DOWN: player.changespeed(0,2) creep.changespeed(0,2) if event.key == pygame.K_ESCAPE: pauseGame() if event.key == pygame.K_1: global currentEditTool currentEditTool = "Tree" changeTool() if event.key == pygame.K_2: global currentEditTool currentEditTool = "Rock" changeTool() if event.type == pygame.KEYUP: if event.key == pygame.K_LEFT: player.changespeed(2,0) creep.changespeed(2,0) if event.key == pygame.K_RIGHT: player.changespeed(-2,0) creep.changespeed(-2,0) if event.key == pygame.K_UP: player.changespeed(0,2) creep.changespeed(0,2) if event.key == pygame.K_DOWN: player.changespeed(0,-2) creep.changespeed(0,-2) if event.type == pygame.MOUSEBUTTONDOWN and pygame.mouse.get_pressed()[0]: for creep in creeps: creep.mouse_click_event(pygame.mouse.get_pos()) if editMap == True: x,y = pygame.mouse.get_pos() if currentEditTool == "Tree": name = insertTree(x-10,y-25, 10 , 10, "tree") wall_list.add(name) wall_list.draw(screen) f = open('MapMaker.txt', "a+") image = pygame.image.load("images/map/tree.png").convert() screen.blit(image, (30,10)) pygame.display.flip() f.write(str(x) + "," + str(y) + ",790,10, tree\n") #f.write("wall=insertTree(" + str(x) + "," + str(y) + ",790,10)\nwall_list.add(wall)\n") elif currentEditTool == "Rock": name = insertRock(x-10,y-25, 10 , 10,"rock") wall_list.add(name) wall_list.draw(screen) f = open('MapMaker.txt', "a+") f.write(str(x) + "," + str(y) + ",790,10,rock\n") #f.write("wall=insertRock(" + str(x) + "," + str(y) + ",790,10)\nwall_list.add(wall)\n") else: None #pygame.display.flip() player.update(wall_list) movingsprites.draw(screen) wall_list.draw(screen) pygame.display.flip() clock.tick(60) pygame.quit()

    Read the article

  • deactivate dynamic contrast on dell xps

    - by Rock
    I am experiencing annoying automatic backlight brightness changes under ubuntu 12.04 LTS on my Dell XPS ultrabook. It seems to be connected to the amount of white pixels on the screen (switching back an forth between dark/light application windows makes the effect noticable, but also just scrolling through a website.) So I think it is the dynamic contrast feature of the notebook screen. How do I turn this off in Ubuntu? Windows offers specific Intel driver options for this, but I can't find any for Ubuntu. EDIT: Model: Dell XPS 14 Ultrabook and currently running Unity

    Read the article

  • Error when I compile kernel 3.3.2 in ubuntu 12.04

    - by rock-alternativo
    I thinks is not a bug of ubuntu. This is the output: OBJCOPY arch/x86/boot/vmlinux.bin HOSTCC arch/x86/boot/tools/build BUILD arch/x86/boot/bzImage Setup is 16800 bytes (padded to 16896 bytes). System is 4599 kB CRC f77d64c0 Kernel: arch/x86/boot/bzImage is ready (#1) Building modules, stage 2. MODPOST 3268 modules ERROR: "__modver_version_show" [drivers/staging/rts5139/rts5139.ko] undefined! WARNING: modpost: Found 4 section mismatch(es). To see full details build your kernel with: 'make CONFIG_DEBUG_SECTION_MISMATCH=y' make[1]: *** [__modpost] Error 1 make: *** [modules] Error 2

    Read the article

  • Remove all problematic characters in an intelligent way in C#

    - by J. Pablo Fernández
    Is there any .Net library to remove all problematic characters of a string and only leave alphanumeric, hyphen and underscore (or similar subset) in an intelligent way? This is for using in URLs, file names, etc. I'm looking for something similar to stringex which can do the following: A simple prelude "simple English".to_url = "simple-english" "it's nothing at all".to_url = "its-nothing-at-all" "rock & roll".to_url = "rock-and-roll" Let's show off "$12 worth of Ruby power".to_url = "12-dollars-worth-of-ruby-power" "10% off if you act now".to_url = "10-percent-off-if-you-act-now" You don't even wanna trust Iconv for this next part "kick it en Français".to_url = "kick-it-en-francais" "rock it Español style".to_url = "rock-it-espanol-style" "tell your readers ??".to_url = "tell-your-readers-ni-hao"

    Read the article

  • Engineers are using explosives to remove hard rock outside our office building. What countermeasures should we take?

    - by Karrax
    Our building is located approx. 100 meters from the explosive charges. They happen several times per day, and really shake the entire building a lot. This is going to go on for many days and the blasts are supposed to get stronger. Our server rooms are nothing fancy; one of them has all the racks on hard concrete while the other one has a raised floor (the one which allows the cables to go beneath it). Does anyone have any tips, countermeasures or best practices for us? Currently we are thinking of the following countermeasures: Daily report of the server rooms status lights (HD lights, power supplies and so on). Nightly check disk scan on the most important servers Order in extra supply of spare harddrives Edit: Many good answers here! However one needs to be accepted. The highest voted answer at the time of this edit will get their answer accepted.

    Read the article

  • Is there a way to tag MP3 the way you can do with Photos in Live Photo Gallery or Picazza?

    - by bangoker
    I really do love the way you can tag pictures in Windows Live Photo Gallery. I find it incredibly useful to be able to tag the same picture with the tag "Cancun" and have it been automatically included when I look for the tag "Beach", "Trips" and "Fun Pic", since its a child tag of the former and also has a tag for the later. I also like that I can look for rating in the pics. On the other side, tagging MP3 has always been a pain in the ass, because I just find it to hard to classify music! Is it pop? techno? techno-pop? rock? indie-rock? indie-post-classic-pop-techno? I hate how ID3 just have one tag for genre, so I've tried tricks like putting all the genres I think it fits into, and then having lists in Winamp (which I dont use anymore) that filter out words in the ID3 tags (ie, Tag: Genre, Contains: Rock = rock list). But then, what about moods? I want to be able to tag my songs in genres and in moods, you know, happy, concentrate/work, party, romantic (wink wink), etc. Is there any way to do this, preferably in a way in which tags could carry on to other music players? Thanks

    Read the article

  • 2D/Isometric map algorithm

    - by Icarus Cocksson
    First of all, I don't have much experience on game development but I do have experience on development. I do know how to make a map, but I don't know if my solution is a normal or a hacky solution. I don't want to waste my time coding things, and realise they're utterly crap and lose my motivation. Let's imagine the following map. (2D - top view - A square) X: 0 to 500 Y: 0 to 500 My character currently stands at X:250,Y:400, somewhere near center of 100px above bottom and I can control him with my keyboard buttons. LEFT button does X--, UP button does Y-- etc. This one is kid's play. I'm asking this because I know there are some engines that automate this task. For example, games like Diablo 3 uses an engine. You can pretty much drag drop a rock to map, and it is automatically being placed here - making player unable to pass through/detect the collision. But what the engine exactly does in the background? Generates a map like mine, places a rock at the center, and checks it like: unmovableObjects = array('50,50'); //we placed a rock at 50,50 location if(Map.hasUnmovableObject(CurrentPlayerX, CurrentPlayerY)) { //unable to move } else { //able to move } My question is: Is this how 2D/Isometric maps are being generated or there is a different and more complex logic behind them?

    Read the article

  • Player & Level class structure in 2D python console game?

    - by Markus Meskanen
    I'm trying to create a 2D console game, where I have a player who can freely move around in a level (~map, but map is a reserved keyword) and interfere with other objects. Levels construct out of multiple Blocks, such as player(s), rocks, etc. Here's the Block class: class Block(object): def __init__(self, x=0, y=0, char=' ', solid=False): self.x = x self.y = y self.char = char self.solid = solid As you see, each block has a position (x, y) and a character to represent the block when it's printed. Each block also has a solid attribute, defining whether it can overlap with other solids or not. (Two solid blocks cannot overlap) I've now created few subclasses from Block (Rock might be useless for now) class Rock(Block): def __init__(self, x=0, y=0): super(Rock, self).__init__(x, y, 'x', True) class Player(Block): def __init__(self, x=0, y=0): super(Player, self).__init__(x, y, 'i', True) def move_left(self, x=1): ... # How do I make sure Player wont overlap with rocks? self.x -= x And here's the Level class: class Level(object): def __init__(self, name='', blocks=None): self.name = name self.blocks = blocks or [] Only way I can think of is to store a Player instance into Level's attributes (self.player=Player(), or so) and then give Level a method: def player_move_left(self): for block in self.blocks: if block.x == self.player.x - 1 and block.solid: return False But this doesn't really make any sense, why have a Player class if it can't even be moved without Level? Imo. player should be moved by a method inside Player. Am I wrong at something here, if not, how could I implement such behavior?

    Read the article

  • Storing tree data in Javascript

    - by Ozh
    I need to store data to represent this: Water + Fire = Steam Water + Earth = Mud Mud + Fire = Rock The goal is the following: I have draggable HTML divs, and when <div id="Fire"> and <div id="Mud"> overlap, I add <div id="Rock"> to the screen. Ever played Alchemy on iPhone or Android? Same stuff Right now, the way I'm doing this is a JS object : var stuff = { 'Steam' : { needs: [ 'Water', 'Fire'] }, 'Mud' : { needs: [ 'Water', 'Earth'] }, 'Rock' : { needs: [ 'Mud', 'Fire'] }, // etc... }; and every time a div overlaps with another one, I traverse the object keys and check the 'needs' array. I can deal with that structure but I was wondering if I could do any better? Edit: I should add that I also need to store a few other things, like a short description or an icon name. So typicall I have Steam: { needs: [ array ], desc: "short desc", icon:"steam.png"},

    Read the article

  • add animation to layer's path in cocos2d

    - by greg rock
    so i'm on cocos2d but before I was on a normal ios app and I had this code : -(void)viewDidLoad{ rootLayer = [[CALayer alloc] init]; [imageView.layer addSublayer:rootLayer]; roundPath = CGPathCreateMutable(); CGPathMoveToPoint(roundPath, nil, center.x , center.y - 35); CGPathAddArcToPoint(roundPath, nil, center.x + 35, center.y - 35, center.x + 35, center.y + 35, 35); CGPathAddArcToPoint(roundPath, nil, center.x + 35, center.y + 35, center.x - 35, center.y + 35, 35); CGPathAddArcToPoint(roundPath, nil, center.x - 35, center.y + 35, center.x - 35, center.y, 35); CGPathAddArcToPoint(roundPath, nil, center.x - 35, center.y - 35, center.x, center.y - 35, 35); CGPathCloseSubpath(roundPath); //Box Path boxPath = CGPathCreateMutable(); CGPathMoveToPoint(boxPath, nil, center.x , center.y - 35); CGPathAddArcToPoint(boxPath, nil, center.x + 35, center.y - 35, center.x + 35, center.y + 35, 4.7); CGPathAddArcToPoint(boxPath, nil, center.x + 35, center.y + 35, center.x - 35, center.y + 35, 4.7); CGPathAddArcToPoint(boxPath, nil, center.x - 35, center.y + 35, center.x - 35, center.y, 4.7); CGPathAddArcToPoint(boxPath, nil, center.x - 35, center.y - 35, center.x, center.y - 35, 4.7); CGPathCloseSubpath(boxPath); shapeLayer = [CAShapeLayer layer]; shapeLayer.path = boxPath; [rootLayer addSublayer:shapeLayer]; } -(void)startAnimation { CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"path"]; animation.duration = 2.0; animation.repeatCount = HUGE_VALF; animation.autoreverses = YES; animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; animation.fromValue = (id)boxPath; animation.toValue = (id)roundPath; [shapeLayer addAnimation:animation forKey:@"animatePath"]; } But I didn't found a way to do the animation fromboxpath toroundpath on cocos2d, I don't know what CCAction use . Can anybody help me ? sorry for my english I'm french :/

    Read the article

  • SharePoint 2010 Custom WCF Service - Windows and FBA Authentication

    - by e-rock
    I have SharePoint 2010 configured for Claims Based Authentication with both Windows and Forms Based Authentication (FBA) for external users. I also need to develop custom WCF Services. The issue is that I want Windows credentials passed into the WCF Service(s); however, I cannot seem to get the Windows credentials passed into the services. My custom WCF service appears to be using Anonymous authentication (which has to be enabled in IIS in order to display the FBA login screen). The example I have tried to follow is found at http://msdn.microsoft.com/en-us/library/ff521581.aspx. The WCF service gets deployed to _vti_bin (ISAPI folder). Here is the code for the .svc file <%@ ServiceHost Language="C#" Debug="true" Service="MyCompany.CustomerPortal.SharePoint.UI.ISAPI.MyCompany.Services.LibraryManagers.LibraryUploader, $SharePoint.Project.AssemblyFullName$" Factory="Microsoft.SharePoint.Client.Services.MultipleBaseAddressBasicHttpBindingServiceHostFactory, Microsoft.SharePoint.Client.ServerRuntime, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" CodeBehind="LibraryUploader.svc.cs" %> Here is the code behind for the .svc file [ServiceContract] public interface ILibraryUploader { [OperationContract] string SiteName(); } [BasicHttpBindingServiceMetadataExchangeEndpoint] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)] public class LibraryUploader : ILibraryUploader { //just try to return site title right now… public string SiteName() { WindowsIdentity identity = ServiceSecurityContext.Current.WindowsIdentity; ClaimsIdentity claimsIdentity = new ClaimsIdentity(identity); return SPContext.Current.Web.Title; } } The WCF test client I have just to test it out (WPF app) uses the following code to call the WCF service... private void Button1Click(object sender, RoutedEventArgs e) { BasicHttpBinding binding = new BasicHttpBinding(); binding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly; binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm; EndpointAddress endpoint = new EndpointAddress( "http://dev.portal.data-image.local/_vti_bin/MyCompany.Services/LibraryManagers/LibraryUploader.svc"); LibraryUploaderClient libraryUploader = new LibraryUploaderClient(binding, endpoint); libraryUploader.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation; MessageBox.Show(libraryUploader.SiteName()); } I am somewhat inexperienced with IIS security settings/configurations when it comes to Claims and trying to use both Windows and FBA. I am also inexperienced when it comes to WCF configurations for security. I usually develop internal biz apps and let Visual Studio decide what to use because security is rarely a concern.

    Read the article

  • Cannot import PyQt4.QtGui

    - by Rock Hymas
    I have a working Python 2.6 install and just installed the PyQt4 built for Python 2.6 (available at http://www.riverbankcomputing.co.uk/software/pyqt/download). When I try to import PyQt4.QtGui I get the following error: ImportError: DLL load failed: The specified procedure could not be found. I'm on Windows 2k8 64-bit, but my Python install is 32-bit.

    Read the article

  • RS-232 confusion under C++

    - by rock
    What's the problem in given code? Why it is not showing the output for rs232 when we connect it by the d-9 connector with the short of pin number 2 & 3 in that? #include <bios.h> #include <conio.h> #define COM1 0 #define DATA_READY 0x100 #define SETTINGS ( 0x80 | 0x02 | 0x00 | 0x00) int main(void) { int in, out, status; bioscom(0, SETTINGS, COM1); /*initialize the port*/ cprintf("Data sent to you: "); while (1) { status = bioscom(3, 0, COM1); /*wait until get a data*/ if (status & DATA_READY) if ((out = bioscom(2, 0, COM1) & 0x7F) != 0) /*input a data*/ putch(out); if (kbhit()) { if ((in = getch()) == 27) /* ASCII of Esc*/ break; bioscom(1, in, COM1); /*output a data*/ } } return 0; }

    Read the article

  • Obtain patterns in one file from another using ack or awk or better way than grep?

    - by Rock
    Is there a way to obtain patterns in one file (a list of patterns) from another file using ack as the -f option in grep? I see there is an -f option in ack but it's different with the -f in grep. Perhaps an example will give you a better idea. Suppose I have file1: file1: a c e And file2: file2: a 1 b 2 c 3 d 4 e 5 And I want to obtain all the patterns in file1 from file2 to give: a 1 c 3 e 5 Can ack do this? Otherwise, is there a better way to handle the job (such like awk or using hash) because I have millions of records in both files and really need an efficient way to complete? Thanks!

    Read the article

  • How to pass a variable inside a jquery fonction $.each($("abc")...?

    - by Rock
    I'm trying to iterate a bunch of SELECT OPTION html drop-down fields and from the ones that are NOT empty, take the values and add a hidden field for a PAYPAL shopping cart. My problem is that for some reason, the variable "curitem" is not passed inside the each function and I can't add the hidden field like they should. All I get is "NaN" or "undefined". What PAYPAL expect is : item_name_1, item_name_2, etc. All numbers must iterate by +1. How can I do this? Thanks a bunch in advance var curitem; $.each($("select"), function(index, item) { var attname = $(this).attr("name"); var nom = $(this).attr("data-nom"); var prix = $(this).attr("data-val"); var partname = attname.substring(0, 1); var qte = $(this).val(); // i want all my <select option> items that the NAME start with "q" AND have a value selected if (partname == "q" && isNaN(qte) == false && qte > 0) { // item name var inp2 = document.createElement("input"); inp2.setAttribute("type", "hidden"); inp2.setAttribute("id", "item_name_"+curitem); inp2.setAttribute("name", "item_name_"+curitem); inp2.setAttribute("value", nom); // amount var inp3 = document.createElement("input"); inp3.setAttribute("type", "hidden"); inp3.setAttribute("id", "amount_"+curitem); inp3.setAttribute("name", "amount_"+curitem); inp3.setAttribute("value", prix); // qty var inp4 = document.createElement("input"); inp4.setAttribute("type", "hidden"); inp4.setAttribute("id", "quantity_"+curitem); inp4.setAttribute("name", "quantity_"+curitem); inp4.setAttribute("value", qte); // add hidden fields to form document.getElementById('payPalForm').appendChild(inp2); document.getElementById('payPalForm').appendChild(inp3); document.getElementById('payPalForm').appendChild(inp4); // item number curitem = curitem + 1; } });

    Read the article

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