Posts

Showing posts from January, 2011

Best Php Online Editor Code Example

Example 1: php online editor Try this sites to write php code online : http : //www.writephponline.com/ http : //sandbox.onlinephpfunctions.com/ https : //paiza.io/en/projects/new http : //phptester.net/ https : //www.tutorialspoint.com/execute_php_online.php https : //rextester.com/l/php_online_compiler http : //phpfiddle.org/ https : //repl.it/languages/php_cli https : //www.jdoodle.com/php-online-editor/ Example 2: php online editor Try to use : https : //repl.it/

A Simple Explanation Of What Is MinGW

Answer : MinGW is a complete GCC toolchain (including half a dozen frontends, such as C, C++, Ada, Go, and whatnot) for the Windows platform which compiles for and links to the Windows OS component C Runtime Library in msvcrt.dll. Rather it tries to be minimal (hence the name). This means, unlike Cygwin, MinGW does not attempt to offer a complete POSIX layer on top of Windows, but on the other hand it does not require you to link with a special compatibility library. It therefore also does not have any GPL-license implications for the programs you write (notable exception: profiling libraries, but you will not normally distribute those so that does not matter). The newer MinGW-w64 comes with a roughly 99% complete Windows API binding (excluding ATL and such) including x64 support and experimental ARM implementations. You may occasionally find some exotic constant undefined, but for what 99% of the people use 99% of the time, it just works perfectly well. You can also use t

Append After Element Jquery Code Example

Example 1: add div after div jquery $( " < p > Test </ p > " ).insertAfter( $( ".container" ) ); Example 2: jquery insert after $( " < p > Test </ p > " ).insertAfter( ".inner" ); Example 3: jquery create html element var newDiv = $(' < div > My new div </ div > '); //create Div Element w/ jquery $( "#someOtherElement" ).append(newDiv); //append new div somewhere Example 4: jquery append after < div class = " container " > < h2 > Greetings </ h2 > < div class = " inner " > Hello </ div > < div class = " inner " > Goodbye </ div > </ div > < script > $ ( "<p>Test</p>" ) . insertAfter ( ".inner" ) ; </ script > Example 5: append after element jquery $("p").after(" < b > You can write your Text Here </ b > ."); Ex

Add Newline To Oh My ZSH Theme

Image
Answer : I was actually searching for the same answer. But my needs was a little more specific since I only wanted to add a newline in the agnoster theme, the one I'm using now. In my research, I find a lot of forked themes that already do it, but I thought that this was an overkill solution for only add a new line. So I read the agnoster code and come up with this simple solution of overwrite the prompt_end() function in my .zshrc file. To do it, just add the code bellow in your .zshrc file: prompt_end() { if [[ -n $CURRENT_BG ]]; then print -n "%{%k%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR" else print -n "%{%k%}" fi print -n "%{%f%}" CURRENT_BG='' #Adds the new line and ➜ as the start character. printf "\n ➜"; } Hope it helps you to have a clue on how to customize your chosen theme. Here is the result: I think the proper place to change one's prompt is in the theme itself. On my syst

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?

Answer : Diagram machinery works also for perturbation theory in classical statistical mechanics and classical field theories. Generally, various kinds of diagrams constitute a pictorial way of talking about tensor products and their contractions while hiding the multi-linear algebra from the layman. In the simplest case, vertices (or blobs) represent vectors, matrices, tensors; vertices have ingoing and/or outgoing ports; ingoing ports denote (contravariant) ro indices; outgoing ports denote (covariant) co indices; directed arcs between blobs give a pair of equal indices summed over; different base spaces ⇔ \Leftrightarrow ⇔ different arc types; symmetric tensors ⇔ \Leftrightarrow ⇔ undirected diagrams; no labels are needed for internal lines. In many cases, the directed arcs are decorated (as thin, thick, broken,wavy, curly lines), each decoration indicating the presence of a so-called propagator, a function of its label to use as a weight in the sum, which may beco

41 Minute Timer Code Example

Example: 20 minute timer for good eyesight every 20 minutes look out the window at something 20 feet away for 20 seconds

Check If File Exist In C Code Example

Example: c check if file exists if ( access ( fname , F_OK ) == 0 ) { // file exists } else { // file doesn't exist }

Cloud Firestore Rules On Subcollection

Answer : Honestly, I think you're okay with your structure and get call as-is. Here's why: If you're fetching a bunch of documents in a subcollection, Cloud Firestore is usually smart enough to cache values as needed. For example, if you were to ask to fetch all 200 items in "conversions/chat_abc/messages", Cloud Firestore would only perform that get operation once and re-use it for the entire batch operation. So you'll end up with 201 reads, and not 400. As a general philosophy, I'm not a fan of optimizing for pricing in your security rules. Yes, you can end up with one or two extra reads per operation, but it's probably not going to cause you trouble the same way, say, a poorly written Cloud Function might. Those are the areas where you're better off optimizing.

How To Install Boost C++ Libraries Code Example

Example: how to install boost c++ on windows goto " https://www.boost.org/users/download/ " goto "Prebuilt windows binaries" click on the version you want dowload the last . exe version install and it ' s all good

53 Inches I Cm Code Example

Example: inch to cm 1 inch = 2.54 cm

Border Shadow In React Native Code Example

Example 1: box shadow react native shadowColor : "#000" , shadowOffset : { width : 0 , height : 2 , } , shadowOpacity : 0.25 , shadowRadius : 4.84 , elevation : 5 , Example 2: react-native shadow generator shadowColor : "#000" , shadowOffset : { width : 0 , height : 2 , } , shadowOpacity : 0.25 , shadowRadius : 3.84 , elevation : 5 , Example 3: box shadow in react native shadowColor : "#000" , shadowOffset : { width : 0 , height : 4 , } , shadowOpacity : 0 , shadowRadius : 4.65 , elevation : 8 , Example 4: shadow border react native shadowColor : "#000" , shadowOffset : { width : 0 , height : 11 , } , shadowOpacity : 0.55 , shadowRadius : 14.78 , elevation : 22 , Example 5: box shadow in react native shadowColor : "#000" , shadowOffset : { width : 0 , height : 1 , } , shadowOpacity : 0.20 , shadowRadius : 1.41 , elevation : 2 , Example 6: b

Android Studio With Java Compiler Error: String Too Large To Encode Using UTF-8 Written Instead As 'STRING_TOO_LARGE'

Answer : I had encountered the same and fixed by clear the build cache . For the time being, you can downgrade Gradle version to resolve this issue. Use gradle 3.1 version like 3.1.3 below. classpath 'com.android.tools.build:gradle:3.1.3' I was stuck on this problem and read through this topic and no one provided a future solution. I did NOT want to revert back my Gradle. Therefore, here is the link to the updated dependencies https://github.com/stripe/stripe-android. Look for the "Android Studio (or Gradle)" section and you should see this "implementation 'com.stripe:stripe-android:8.1.0'" also you might need to add "-keep class com.stripe.android.** { *; }" if you are enabling minification in your build.gradle file. Overall Stripe has stopped updating their own "Stripe docs" which can be found here. To give them credit their docs are helpful and should be read at least once, but be mindful that most of the docs are

Apple - Change Click Firmness Of Apple Magic Trackpad 2

Image
Answer : Not an answer yet , but I came across the same issue earlier this week. I tested it on a variety of Macs (two MBPs and one iMac Pro) running El Capitan, Sierra and High Sierra respectively. In all cases the Trackpad settings provided no click pressure options, or Force Click/haptic feedback option. I've got a case open with Apple Engineering and will update this answer when I hear back. Update I've spent the last week troubleshooting this with Apple and we've confirmed this is an issue with how macOS High Sierra interacts with the Magic Trackpad 2. In our testing we found the following: A Magic Trackpad 2 connected to any model MacBook running El Capitan or Sierra will display the Click pressure slider and the two checkboxes relating to Force Click/haptic feedback and Silent clicking A Magic Trackpad 2 connected to any desktop Mac running El Capitan or Sierra will display the Click pressure slider and the two checkboxes relating to Force Click/

Check Open Ports On Windows 10 Cmd Code Example

Example: how to check for open ports in windows netstat - an

Can't Attach Android Studio's Debugger To Android Process

Answer : So finally I got it working, by: Checking 'Show all processes' checkbox! BUT as you see in the question, checkbox was on at the beginning, so there were multiple issues. To summarize, these are other actions to be done: Kill all adb processes (use ps -x | grep adb and kill -9 [process id] ) adb start-server in terminal Reconnect device adb devices (to make sure device is connected successfully) Make sure Android DDMS Devices | logcat shows your app and only one device is listed. Check Show all processes checkbox. See screenshot I solved this way a. Closed Android Studio b. Did adb kill-server from a terminal. Also check the adb process in also killed from the Running processes window in PC c. Started Android Studio d. Android Studio tried to initialize adb again and back to work. It could be because the release build variant (which you can set in the Build-Variants section) has been chosen mistakenly, only debug-variant is debuggabl

Can Google Mock A Method With A Smart Pointer Return Type?

Answer : A feasible workaround for google mock framework's problems with non (const) copyable function arguments and retun values is to use proxy mock methods. Suppose you have the following interface definition (if it's good style to use std::unique_ptr in this way seems to be more or less a philosophical question, I personally like it to enforce transfer of ownership): class IFooInterface { public: virtual void nonCopyableParam(std::unique_ptr<IMyObjectThing> uPtr) = 0; virtual std::unique_ptr<IMyObjectThing> nonCopyableReturn() = 0; virtual ~IFooInterface() {} }; The appropriate mock class could be defined like this: class FooInterfaceMock : public IFooInterface { public: FooInterfaceMock() {} virtual ~FooInterfaceMock() {} virtual void nonCopyableParam(std::unique_ptr<IMyObjectThing> uPtr) { nonCopyableParamProxy(uPtr.get()); } virtual std::unique_ptr<IMyObjectThing> nonCopyableReturn() { r

Can I Use React Bootstrap With Next.js?

Answer : It is obviously possible to use react-bootstrap in a nextjs application. The only problem you might encounter will be in the rendering of your application if javascript is disabled in user's browser if you use react-bootstrap components to build your layout (see example below). Nextjs allows you to display SSG/SSR pages, javascript-disabled users will see your app but the layout will be messy. But if you still want to go with it: npm i react-bootstrap bootstrap Import bootstrap styles in your _app.js: import 'bootstrap/dist/css/bootstrap.min.css'; You can then use your react-bootstrap components as you would do in reactjs: import {Container, Row, Col} from 'react-bootstrap'; const Layout = () => ( <> <Container fluid> <Row> <Col> <p>Yay, it's fluid!</p> </Col> </Row> </Container> </> ); export default Layout; Yes

Comic Sans Css Code Example

Example 1: css comic sans font-family : "Comic Sans MS" , "Comic Sans" , cursive ; Example 2: sans serif font family css <style > .sansserif { font-family : Arial , Helvetica , sans-serif ; } </style> Example 3: css font families p { font-family : "Times New Roman" , Times , serif ; } Example 4: comic sans download download it

Approximation Symbol: Is \pi \approx 3.14\dots Ï€≈3.14… Equivalent To \pi \fallingdotseq 3.14\dots Ï€≒3.14…?

Answer : Any mathematical notation is ok as long as it is common knowledge in your community. For instance, I believe I fully understand the meaning of the ≈ \approx ≈ symbol. However, I haven't ever seen the second symbol you provided. To be on the sure side you should provide a definition of any relation symbol you don't consider to be common knowledge. This may happen as a short remark ("..., where ≈ \approx ≈ denotes ...") or maybe as a table of the used symbols in the front matter of your work. As with any definition in mathematics, there is no right or wrong in the symbol/notion/etc. you use, only proper or unsound definitions. Also: When in doubt, use the symbol that is used more commonly in the standard textbooks of your field. There is no benefit in being avant-garde at notation. While it is certainly true that with the proper definition there is now 'wrong' notation, perhaps it should be mentioned that some notation is more suggestive and/o

Auto Increment In Sql Code Example

Example 1: how to auto increment in sql CREATE TABLE Persons ( Personid int NOT NULL AUTO_INCREMENT , LastName varchar ( 255 ) NOT NULL , FirstName varchar ( 255 ) , Age int , PRIMARY KEY ( Personid ) ) ; INSERT INTO Persons ( FirstName , LastName ) VALUES ( 'Lars' , 'Monsen' ) ; Example 2: create table with primary key auto increment in sql CREATE TABLE table_name ( id INT NOT NULL IDENTITY ( 1 , 1 ) , name NVARCHAR ( 100 ) NULL , school NVARCHAR ( 100 ) NULL , PRIMARY KEY ( ID ) ) ; Example 3: id increment ms sql server CREATE TABLE Persons ( Personid int IDENTITY ( 1 , 1 ) PRIMARY KEY , LastName varchar ( 255 ) NOT NULL , FirstName varchar ( 255 ) , Age int ) ; Example 4: how to alter auto increment in sql INSERT INTO Persons ( Personid , FirstName , LastName ) VALUES ( seq_person . nextval , 'Lars' , 'Monsen' ) ; Example 5: what is auto