- Amex Card:
^3[47][0-9]{13}$ - BCGlobal:
^(6541|6556)[0-9]{12}$ - Carte Blanche Card:
^389[0-9]{11}$ - Diners Club Card:
^3(?:0[0-5]|[68][0-9])[0-9]{11}$ - Discover Card:
^65[4-9][0-9]{13}|64[4-9][0-9]{13}|6011[0-9]{12}|(622(?:12[6-9]|1[3-9][0-9]|[2-8][0-9][0-9]|9[01][0-9]|92[0-5])[0-9]{10})$ - Insta Payment Card:
^63[7-9][0-9]{13}$ - JCB Card:
^(?:2131|1800|35\d{3})\d{11}$ - KoreanLocalCard:
^9[0-9]{15}$
- Create
UNLOGGEDtable. This reduces the amount of data written to persistent storage by up to 2x. - Set
WITH (autovacuum_enabled=false)on the table. This saves CPU time and IO bandwidth on useless vacuuming of the table (since we neverDELETEorUPDATEthe table). - Insert rows with
COPY FROM STDIN. This is the fastest possible approach to insert rows into table. - Minimize the number of indexes in the table, since they slow down inserts. Usually an index
on
time timestamp with time zoneis enough. - Add
synchronous_commit = offtopostgresql.conf. - Use table inheritance for fast removal of old data:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Override | |
| protected void onDraw(Canvas canvas) { | |
| super.onDraw(canvas); | |
| mPaint.setStyle(Paint.Style.STROKE); | |
| mPaint.setStrokeWidth(50); | |
| // Setting the color of the circle | |
| mPaint.setColor(Color.BLUE); | |
| // Draw the circle at (x,y) with radius 250 |
Android Studio exposes developers to -nodpi and -anydpi in various places. For example, if you use the New Resource Directory wizard thing, and you choose to add a density qualifier to the directory, you will see "No Density" (-nodpi) and "Any Density" (-anydpi) options.
Some of you might expect these to be well-documented.
In a word, no.
However, courtesy of a fair amount of experimentation (largely done as part of work on this Stack Overflow question and this answer), their use becomes at least a bit clearer. Many thanks to Stack Overflow user rds for the help!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Industry | ||
|---|---|---|
| Accounting | ||
| Airlines/Aviation | ||
| Alternative Dispute Resolution | ||
| Alternative Medicine | ||
| Animation | ||
| Apparel/Fashion | ||
| Architecture/Planning | ||
| Arts/Crafts | ||
| Automotive |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // FIT LAYER TO CANVAS | |
| // via https://forums.adobe.com/message/5413957#5413957 | |
| var maintainAspectRatio;// set to true to keep aspect ratio | |
| if(app.documents.length>0){ | |
| app.activeDocument.suspendHistory ('Fit Layer to Canvas', 'FitLayerToCanvas('+maintainAspectRatio+')'); | |
| } | |
| function FitLayerToCanvas( keepAspect ){// keepAspect:Boolean - optional. Default to false | |
| var doc = app.activeDocument; | |
| var layer = doc.activeLayer; | |
| // do nothing if layer is background or locked |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent"> | |
| <ProgressBar | |
| android:id="@+id/progress_limit" | |
| style="?android:attr/progressBarStyleHorizontal" | |
| android:layout_width="match_parent" | |
| android:layout_height="wrap_content" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // openning connection | |
| $link = mysqli_connect('host', 'user', 'password', 'database') | |
| or die('Could not connect to server'.'<br>'); | |
| // uncomment next line to debug | |
| //print 'connection opened'.'<br>'; | |
| ?> |
NewerOlder