Posts

php - Laravel 5 keep redirecting me to `/auth/login` when go to an route post? -

i'm new laravel 5. have route post /subscribe . //subcribe route::post('/subscribe','subscribecontroller@postsubscribe'); when goto it, laravel application auto redirecting me : /auth/login i notice, in i have : /app/http/routes.php route::controllers([ 'auth' => 'auth\authcontroller', 'password' => 'auth\passwordcontroller', ]); auth controller <?php namespace app\http\controllers\auth; use app\http\controllers\controller; use illuminate\contracts\auth\guard; use illuminate\contracts\auth\registrar; use illuminate\foundation\auth\authenticatesandregistersusers; class authcontroller extends controller { /* |-------------------------------------------------------------------------- | registration & login controller |-------------------------------------------------------------------------- | | controller handles registration of new users, | authentication of existing u...

Position :before pseudoclass in-between parent and child CSS -

Image
(basically i'm trying style text field beyond normal capabilities, including filler text doesn't interact directly cursor.) i wonder if it's possible position (using z-index if possible) :before element behind child elements of container element, in front of container background. (maybe you'd understand in bit) html: <div class="field" data-title="john"> <input type="text" name="firstname"> </div> css: .field{ background-color:white; border:1px solid gray; } .field:before{ content:attr(data-title); } input[type="text"]{ background-color:transparent; border:none; outline:none; } this displays correctly: however, i'm concerned because cannot focus text field if cursor on :before content (in case, word "john"). i understand :before can styled pointer-events:none , however, "pointer-events" tag not yet entirely cross-browser compati...

java - Bad operand types error -

i getting error when trying add input validation program working on: bad operand types binary operator '||' first type: boolean; second type: java.lang.string here's code: string x = scan.nextline(); while (!x.tolowercase().equals("buy lamborghini")||("donate")||("do know am")||("go sailing")||("drink fine wine")||("invest")||("gamble")) { system.out.println("please choose valid option"); } the error highlighted around "donate" portion of while condition the problem trying use or operand string , boolean what want this: while (!(x.tolowercase().equals("buy lamborghini") || x.tolowercase().equals("donate") || x.tolowercase().equals("do know am") || x.tolowercase().equals("go sailing") || x.tolowercase().equals("drink fine wine") || x.tolowercase().equals("invest") || x...

java - Error with console.readLine(); but everything looks correct in code? -

when try run says there problem console.readline(); . import java.io.console; public class pingpong { public static void main(string[] args) { system.out.println("give me number, honey?"); string stringyournumber = console.readline(); integer yournumber = integer.parseint(stringyournumber); system.out.println("here ya go:"); ( integer i=1; <=yournumber; i++){ if( % 5==0 && % 3==0){ system.out.println("pingpong"); } else { if (i % 5==0){ system.out.println("pong"); } else { if ( % 3==0){ system.out.println("ping"); } } } } } you have declare , intialize variable called console console console = system.console(); if (console != null) { str = console.readline (); }

Append text to all files in a directory using batch -

i'm complete batch beginner.. i'm trying add 'exit' last line of every text file in folder. i it's combination of , echo can't work after doing lot of searching. my current attempt; for %%i in (*.*) echo exit >> %cd% %%i :( any appreciated! it if explained why think “can't work”; i'm guessing want: for %%i in (*.txt) echo exit>> %%i don't put space after text want echo . don't know why have %cd% in redirection; try send text local directory, makes no sense. if you're trying send file in different directory need separate them window’s directory separator: ... echo whatever>> \other\directory\%%i you don't need %cd%

c - GCC inline assembly constants (ARM) -

is there way give constants inline assembly code "parameters"? i'm trying make co-processor access functions. tried 2 approaches: macro-replacement , extensions. the use this: unsigned int read_id_pfr1() { read_cp15(0, 0, 1, 1); return cp_reg_val; } the macro approach: #define read_cp15(opc, crn, crm, opc2) \ asm volatile (\ "push {r0, r1}\n\t"\ "mrc p15, opc, r0, crn, crm, opc2\n\t"\ "ldr r1, =cp_reg_val\n\t"\ "str r0, [r1]\n\t"\ "pop {r0, r1}\n\t"\ ) i think parameters (opc, crn, ...) not expanded because used within quotation marks. the extension approach looks this: #define write_cp15(opc, crn, crm, opc2) \ asm volatile (\ "push {r0, r1}\n\t"\ "ldr r1, =cp_reg_val\n\t"\ "ldr r0, [r1]\n\t"\ "mcr p15, %[op], r0, c%[rn], c%[rm], %[op2]\n\t"\ "pop {r0, r1}\n\t"\ ::[op]...

callback - C++ Java Handler equivilent -

i'm coming java/c# background , new c++. writing library , trying accomplish same functionality handler in java. scenario follows: i building winrt library user put mobile/desktop app. @ point, after network communication happens, piece of data come in want pass along user. in java, declare public static handler (but not initialize it) user can initialize. when data comes in, send message through handler, , end user's declaration within app gets called, receiving message , grabbing data it. i can't seem find way same in c++. have looked @ kinds of posts/documentation on delegates/function pointers, utilizing mighty google keywords "callback", "handler", , "delegate". think have half-formed understanding work differently in c++, nothing bearing fruit. could kindly point me in right direction? pretty same you'd in java. in library, define pure virtual class (more-or-less analogous java interface ) of handler. class somet...