Breaking News

Selasa, 25 Februari 2014

Situs Untuk Anda Yang Jomblo Di Luar Sana



Jejaring sosial ini resmi di luncurkan pada tanggal 6 Februari 2014. Setelah sebelumnya masih dalam versi beta, namun hanya dalam waktu dua pekan saja mereka dapat menggaet 9.000 pengguna. Menakjubkan bukan?

Dalam wawancara yang dilakukan oleh Kompas, Jomblo.com telah beranggotakan 20.000 pengguna terhitung pada tanggal 21 Februari. Pendirinya yang bernama Darrick Rochili ini berharap Indonesia dapat menelurkan karya-karyanya di bidang IT.

Sejauh ini sebagian besar masih user yang berada di Jakarta (50%), lalu sisanya di Surabaya (10%), Bandung (7%), Yogyakarta (5%), Medan (2,5%), Semarang dan kota-kota lainnya.
Read more ...

Selasa, 18 Februari 2014

Relasi Pada yii Framework

Untuk menjelas bagaimana relasi Active Record berfungsi, mari kita ambil contoh. Penulis akan menggunakan contoh dari pembuatan blog (contoh mana lagi yang familiar bagi para Yii-ers kalau bukan Blog). Terdapat tiga tabel yakni tbl_post, yang menampung artikel blog, tbl_user yang menampung nama-nama pengarang, dan tbl_comment yang menampung komentar atas artikel blog.
Yii Framework
Yii Framework yang cepat, aman dan profesional
Post memiliki relasi dengan User. Sebuah Post juga memiliki relasi dengan Comment. Kira-kira seperti beginilah relasi mereka:
Desain ERD Pembuatan Blog
Desain ERD Pembuatan Blog

Dari situ kita bisa melihat bahwa satu Post dibuat oleh satu User. Tetapi seorang User bisa saja menulis beberapa Post. Satu Post bisa memiliki beberapa Comment. Tetapi Comment hanya mungkin merujuk ke satu Post.Sekarang kita mulai mencoba membandingkan cara code tanpa framework versus code dengan Yii Framework. Misalkan kita ingin mengetahui Post dengan id 1 ditulis oleh siapa, maka apa yang harus kita lakukan?
Jika dengan code manual kita harus menulis query kira-kira seperti ini:
$query = "SELECT Author.* FROM Post JOIN Author ON Post.author_id = Author.id WHERE Post.id = 1";
$dataReader = mysql_query($query);
$data = mysql_fetch_array($dataReader);
echo $dataReader["name"];
Bandingkan dengan versi Yii
$post = Post::model()->findByPk(1);//kita perlu load Post id 1
echo $post->author->name; //voila! langsung cetak nama author!
Terlihat jelas siapa yang lebih cepat dan efisien. Bagi yang belum mengenali Yii mungkin penasaran, bagaimana itu mungkin bisa dilakukan?
Di dalam file Active Record (file-file yang terdapat di dalam folder /protected/models/), terdapat method relations() yang berfungsi untuk mengatur hubungan antar tabel. Yii menyediakan lima jenis relasi antar tabel untuk digunakan, yakni BELONGS_TO, HAS_MANY, HAS_ONE, MANY_MANY dan STAT. BELONGS_TO dan HAS_MANY merupakan yang paling sering digunakan.

BELONGS_TO

Kapan kita menggunakan BELONGS_TO? Ketika terdapat sebuah tabel dengan field foreign key. Contohnya seperti tabel Post yang memiliki field author_id(author_id merupakan foreign key yang merujuk ke tabel Author). Tabel Comment yang memiliki field post_id. Kita menggunakan BELONGS_TO untuk mendapatkan informasi field melalui foreign key itu. Contoh pemakaian:
//di model Post
public function relations()
{
 return array(
  'pengarang'=>array(self::BELONGS_TO, 'Author', 'author_id'),
 );
}
//cara pakai, misalnya dari Post ber-id 1, kita ingin tahu pengarang siapa
$post = Post::model()->findByPk(1);
$post->pengarang->name; //gunakan "pengarang" sesuai nama relasi.
Contoh setting relasi di Comment
public function relations()
{
 return array(
  'posts'=>array(self::BELONGS_TO, 'Post', 'post_id'),
 );
}

HAS_MANY

HAS_MANY merupakan kebalikan dari BELONGS_TO. Post memiliki author_id yang BELONGS_TO Author. Maka, Author HAS_MANY Post (Author memiliki banyak Post). Dengan mengeset HAS_MANY pada Author maka kita menjadi bisa mengetahui Author bersangkutan sudah menulis berapa buku.
Berikut contoh setting relasinya:
$author = Author::model()->findByPk(2); //cari pengarang yang memiliki id 2.
$daftarPost = $author->posts;
foreach($daftarPost as $post){ //harus melakukan looping kalau ingin mendapatkan nama post
 echo $post->name;
}
Mengapa harus menggunakan foreach untuk menampilkan informasi? Ini tidak lain dikarenakan hasil dari relasi HAS_MANY itu selalu dalam bentuk array. Oleh karena itu, kita biasanya selalu perlu melakukan looping (umumnya foreach) untuk mendapatkan nilainya.
Kesalahan yang sering dilakukan pemula dalam memanfaatkan HAS_MANY adalah langsung mengaksesnya. Akibatnya mendapatkan error seperti Trying to get property of non-object. Contoh code yang salah:
$author = Author::model()->findByPk(2); //cari pengarang yang memiliki id 2.
$daftarPost = $author->posts->name; //ERROR!!

Relasi Lainnya

Dengan dua relasi tersebut sebetulnya sudah memenuhi sebagian besar kebutuhan programmer. Karena sebagian besar desain database memang adalah dalam bentuk satu ke banyak(One to Many). Tetapi tidak menutup kemungkinan adanya satu ke satu (One to One). Di sinilah kita menggunakan HAS_ONE.
Selain itu, terkadang terdapat relasi antar dua tabel yang sifatnya banyak ke banyak (Many to Many). Jika Anda memiliki latar belakang database, maka pasti tahu tabel yang berelasi banyak ke banyak harus dibuat sebuah tabel penengah supaya di dalam desain tidak ada relasi banyak ke banyak sama sekali. Lagipula relasi banyak ke banyak adalah mustahil untuk dibuat di dalam database. Kalau demikian, mengapa Yii masih menyediakan relasi MANY_MANY?
sumber
Read more ...

Sabtu, 15 Februari 2014

Shortcut Autocad

autocad-keyboard-sortcuts
AutoCAD Keyboard Shortcuts in Manage Drawings:
Ctrl+nNew Drawing
Ctrl+sSave drawing
Ctrl+oOpen drawing
Ctrl+pPlot dialog box
Ctrl+Tab/Ctrl+Shift+TabSwitch to next / switch to previous drawing
Ctrl+Page Up/Page DownSwitch to next tab / switch to previous tab in current drawing
Ctrl+qExit
Ctrl+aSelect all objects
AutoCAD Keyboard Shortcuts List in Toggle Drawing Modes:
F3Toggles object snap mode
F7Toggle grid mode
F8Toggle ortho mode
F9Toggle snap mode
F10Toggle polar mode
F11Toggle object snap tracking
F12Toggle dynamic input mode
AutoCAD Keyboard Shortcuts in Manage Screen:
Ctrl+0 (zero)Clean Screen
Ctrl+1Property Palette
Ctrl+2Design Center Palette
Ctrl+3Tool Palette
Ctrl+4Sheet Set Palette
Ctrl+6DBConnect Manager
Ctrl+7Markup Set Manager Palette
Ctrl+8Quick Calc
Ctrl+9Command Line
AutoCAD Keyboard Shortcuts in Manage Workflow:
Ctrl+cCopy object
Ctrl+xCut object
Ctrl+vPaste object
Ctrl+Shift+cCopy to clipboard with base point
Ctrl+Shift+vPaste data as block
Ctrl+zUndo last action
Ctrl+yRedo last action
Ctrl+[Cancel current command (or ctrl+\)
AutoCAD Keyboard Shortcuts in Toggle General Features:
Ctrl+dToggle coordinate display
Ctrl+gToggle Grid
Ctrl+eCycle isometric planes
Ctrl+fToggle running object snaps
Ctrl+hToggle Pick Style
Ctrl+Shift+hToggle Hide pallets
Ctrl+iToggle Coords
Ctrl+Shift+iToggle Infer Constraints
AutoCAD Command Shortcut Keys or AutoCAD Hot Keys A – Z

AutoCAD Keyboard Shortcuts – A Key:
AARC / Creates an arc.
ADCADCENTER / Manages and inserts content such as blocks, xrefs, and hatch patterns.
AAAREA / Calculates the area and perimeter of objects or of defined areas.
ALALIGN / Aligns objects with other objects in 2D and 3D
APAPPLOAD / Load Application
ARARRAY / Creates multiple copies of objects in a pattern.
ARRACTRECORD / Starts the Action Recorder.
ARMACTUSERMESSAGE / Inserts a user message into an action macro.
ARUACTUSERINPUT / Pauses for user input in an action macro.
ARSACTSTOP / Stops the Action Recorder and provides the option of saving the recorded actions to an action macro file.
ATIATTIPEDIT / Changes the textual content of an attribute within a block.
ATTATTDEF / Redefines a block and updates associated attributes.
ATEATTEDIT / Changes attribute information in a block.

AutoCAD Keyboard Shortcuts – B Key:
BBLOCK / Creates a block definition from selected objects.
BCBCLOSE / Closes the Block Editor.
BEBEDIT / Opens the block definition in the Block Editor.
BHHATCH / Fills an enclosed area or selected objects with a hatch pattern, solid fill, or gradient fill.
BOBOUNDARY / Creates a region or a polyline from an enclosed area.
BRBREAK / Breaks the selected object between two points.
BSBSAVE / Saves the current block definition.
BVSBVSTATE / Creates, sets, or deletes a visibility state in a dynamic block.

AutoCAD Keyboard Shortcuts – C Key:
CCIRCLE / Creates a circle.
CAMCAMERA / Sets a camera and target location to create and save a 3D perspective view of objects.
CBARCONSTRAINTBAR / A toolbar-like UI element that displays the available geometric constraints on an object.
CHPROPERTIES / Controls properties of existing objects.
CHACHAMFER / Bevels the edges of objects.
CHKCHECKSTANDARDS / Checks the current drawing for standards violations.
CLICOMMANDLINE / Displays the Command Line window.
COLCOLOR / Sets the color for new objects.
COCOPY / Copies objects a specified distance in a specified direction.
CTCTABLESTYLE / Sets the name of the current table style
CUBENAVVCUBE / Controls the visibility and display properties of the ViewCube tool.
CYLCYLINDER / Creates a 3D solid cylinder.

AutoCAD Keyboard Shortcuts – D Key:
DDIMSTYLE / Creates and modifies dimension styles.
DANDIMANGULAR / Creates an angular dimension.
DARDIMARC / Creates an arc length dimension.
JOGDIMJOGGED / Creates jogged dimensions for circles and arcs.
DBADIMBASELINE / Creates a linear, angular, or ordinate dimension from the baseline of the previous or selected dimension.
DBCDBCONNECT / Provides an interface to external database tables.
DCEDIMCENTER / Creates the center mark or the centerlines of circles and arcs.
DCODIMCONTINUE / Creates a dimension that starts from an extension line of a previously created dimension.
DCONDIMCONSTRAINT / Applies dimensional constraints to selected objects or points on objects.
DDADIMDISASSOCIATE / Removes associativity from selected dimensions.
DDIDIMDIAMETER / Creates a diameter dimension for a circle or an arc.
DEDDIMEDIT / Edits dimension text and extension lines.
DIDIST / Measures the distance and angle between two points.
DIVDIVIDE / Creates evenly spaced point objects or blocks along the length or perimeter of an object.
DJLDIMJOGLINE / Adds or removes a jog line on a linear or aligned dimension.
DJODIMJOGGED / Creates jogged dimensions for circles and arcs.
DLDATALINK / The Data Link dialog box is displayed.
DLUDATALINKUPDATE / Updates data to or from an established external data link.
DODONUT / Creates a filled circle or a wide ring.
DORDIMORDINATE / Creates ordinate dimensions.
DOVDIMOVERRIDE / Controls overrides of system variables used in selected dimensions.
DRDRAWORDER / Changes the draw order of images and other objects.
DRADIMRADIUS / Creates a radius dimension for a circle or an arc.
DREDIMREASSOCIATE / Associates or re-associates selected dimensions to objects or points on objects.
DRMDRAWINGRECOVERY / Displays a list of drawing files that can be recovered after a program or system failure.
DSDSETTINGS / Sets grid and snap, polar and object snap tracking, object snap modes, Dynamic Input, and Quick Properties.
DTTEXT / Creates a single-line text object.
DVDVIEW / Defines parallel projection or perspective views by using a camera and target.
DXDATAEXTRACTION / Extracts drawing data and merges data from an external source to a data extraction table or external file

AutoCAD Keyboard Shortcuts – E-G Key:
EERASE / Removes objects from a drawing.
EDDDEDIT / Edits single-line text, dimension text, attribute definitions, and feature control frames.
ELELLIPSE / Creates an ellipse or an elliptical arc.
EREXTERNALREFERENCES / Opens the External References palette.
EXEXTEND / Extends objects to meet the edges of other objects.
EXITQUIT / Exits the program.
EXPEXPORT / Saves the objects in a drawing to a different file format.
EXTEXTRUDE / Extends the dimensions of a 2D object or 3D face into 3D space.
FFILLET / Rounds and fillets the edges of objects.
FIFILTER / Creates a list of requirements that an object must meet to be included in a selection set.
FSHOTFLATSHOT / Creates a 2D representation of all 3D objects based on the current view.
GGROUP / Creates and manages saved sets of objects called groups.
GCONGEOCONSTRAINT / Applies or persists geometric relationships between objects or points on objects.
GDGRADIENT / Fills an enclosed area or selected objects with a gradient fill.
GEOGEOGRAPHICLOCATION / Specifies the geographic location information for a drawing file.

AutoCAD Keyboard Shortcuts – H-L Key:
HHATCH / Fills an enclosed area or selected objects with a hatch pattern, solid fill, or gradient fill.
HEHATCHEDIT / Modifies an existing hatch or fill.
HIHIDE / Regenerates a 3D wireframe model with hidden lines suppressed.
IINSERT / Inserts a block or drawing into the current drawing.
IADIMAGEADJUST / Controls the image display of the brightness, contrast, and fade values of images.
IATIMAGEATTACH / Inserts a reference to an image file.
ICLIMAGECLIP / Crops the display of a selected image to a specified boundary.
IMIMAGE / Displays the External References palette.
IMPIMPORT / Imports files of different formats into the current drawing.
ININTERSECT / Creates a 3D solid, surface, or 2D region from overlapping solids, surfaces, or regions.
INFINTERFERE / Creates a temporary 3D solid from the interferences between two sets of selected 3D solids.
IOINSERTOBJ / Inserts a linked or embedded object.
JJOIN / Joins similar objects to form a single, unbroken object.
LLINE / Creates straight line segments.
LALAYER / Manages layers and layer properties.
LASLAYERSTATE / Saves, restores, and manages named layer states.
LEQLEADER / Creates a leader and leader annotation.
LENLENGTHEN / Changes the length of objects and the included angle of arcs.
LESSMESHSMOOTHLESS / Decreases the level of smoothness for mesh objects by one level.
LILIST / Displays property data for selected objects.
LOLAYOUT / Creates and modifies drawing layout tabs.
LTLINETYPE / Loads, sets, and modifies linetypes.
LTSLTSCALE / Changes the scale factor of linetypes for all objects in a drawing.
LWLWEIGHT / Sets the current lineweight, lineweight display options, and lineweight units.

AutoCAD Keyboard Shortcuts – M-O Key:
MMOVE / Moves objects a specified distance in a specified direction.
MAMATCHPROP / Applies the properties of a selected object to other objects.
MATMATERIALS / Shows or hides the Materials window.
MEMEASURE / Creates point objects or blocks at measured intervals along the length or perimeter of an object.
MEAMEASUREREGION / Measures the distance, radius, angle, area, and volume of selected objects or sequence of points.
MIMIRROR / Creates a mirrored copy of selected objects.
MLMLNE / Creates multiple parallel lines.
MLAMLEADERALIGN / Aligns and spaces selected multileader objects.
MLCMLEADERCOLLECT / Organizes selected multileaders that contain blocks into rows or columns, and displays the result with a single leader.
MLDMLEADER / Creates a multileader object.
MLEMLEADEREDIT / Adds leader lines to, or removes leader lines from, a multileader object.
MLSMLEADERSTYLE / Creates and modifies multileader styles.
MOPROPERTIES / Controls properties of existing objects.
MOREMESHSMOOTHMORE / Increases the level of smoothness for mesh objects by one level.
MSMSPACE / Switches from paper space to a model space viewport.
MSMMARKUP / Opens the Markup Set Manager.
MTMTEXT / Creates a multiline text object.
MVMVIEW / Creates and controls layout viewports.
NORTHGEOGRAPHICLOCATION / Specifies the geographic location information for a drawing file.
NSHOTNEWSHOT / Creates a named view with motion that is played back when viewed with ShowMotion.
NVIEWNEWVIEW / Creates a named view with no motion.
OOFFSET / Creates concentric circles, parallel lines, and parallel curves.
OPOPTIONS / Customizes the program settings.
ORBIT3DORBIT / Rotates the view in 3D space, but constrained to horizontal and vertical orbit only.
OSOSNAP / Sets running object snap modes.

AutoCAD Keyboard Shortcuts – P Key:
PPAN / Adds a parameter with grips to a dynamic block definition.
PAPASTESPEC / Pastes objects from the Clipboard into the current drawing and controls the format of the data.
PARPARAMETERS / Controls the associative parameters used in the drawing.
PARAMBPARAMETER / Adds a parameter with grips to a dynamic block definition.
PATCHSURFPATCH /
PCPOINTCLOUD /
PCATTACHPOINTCLOUDATTACH /
PCINDEXPOINTCLOUDINDEX /
PEPEDIT / Edits polylines and 3D polygon meshes.
PLPLINE / Creates a 2D polyline.
POPOINT / Creates a point object.
POFFHIDEPALETTES / Hides currently displayed palettes (including the command line).
POLPOLYGON / Creates an equilateral closed polyline.
PONSHOWPALETTES / Restores the display of hidden palettes.
PREPREVIEW / Displays the drawing as it will be plotted.
PRINTPLOT / Plots a drawing to a plotter, printer, or file.
PSPSPACE / Switches from a model space viewport to paper space.
PSOLIDPOLYSOLID / Creates a 3D wall-like polysolid.
PTWPUBLISHTOWEB / Creates HTML pages that include images of selected drawings.
PUPURGE / Removes unused items, such as block definitions and layers, from the drawing.
PYRPYRAMID / Creates a 3D solid pyramid.

AutoCAD Keyboard Shortcuts – Q-R Key:
QCQUICKCALC / Opens the QuickCalc calculator.
QCUIQUICKCUI / Displays the Customize User Interface Editor in a collapsed state.
QPQUICKPROPERTIES / Displays open drawings and layouts in a drawing in preview images.
QVDQVDRAWING / QVLAYOUTCLOSE
QVDCQVDRAWINGCLOSE / Closes preview images of open drawings and layouts in a drawing.
QVLQVLAYOUT / Displays preview images of model space and layouts in a drawing.
RREDRAW / Refreshes the display in the current viewport.
RAREDRAWALL / Refreshes the display in all viewports.
RCRENDERCROP / Renders a specified rectangular area, called a crop window, within a viewport.
REREGEN / Regenerates the entire drawing from the current viewport.
REAREGENALL / Regenerates the drawing and refreshes all viewports.
RECRECTANG / Creates a rectangular polyline.
REGREGION / Converts an object that encloses an area into a region object.
RENRENAME / Changes the names assigned to items such as layers and dimension styles.
REVREVOLVE / Creates a 3D solid or surface by sweeping a 2D object around an axis.
ROROTATE / Rotates objects around a base point.
RPRENDERPRESETS / Specifies render presets, reusable rendering parameters, for rendering an image.
RPRRPREF / Displays or hides the Advanced Render Settings palette for access to advanced rendering settings.
RRRENDER / Creates a photorealistic or realistically shaded image of a 3D solid or surface model.
RWRENDERWIN / Displays the Render window without starting a rendering operation.

AutoCAD Keyboard Shortcuts – S Key:
SSTRETCH / Stretches objects crossed by a selection window or polygon.
SCSCALE / Enlarges or reduces selected objects, keeping the proportions of the object the same after scaling.
SCRSCRIPT / Executes a sequence of commands from a script file.
SECSECTION / Uses the intersection of a plane and solids, surfaces, or mesh to create a region.
SETSETVAR / Lists or changes the values of system variables.
SHASHADEMODE / Starts the VSCURRENT command.
SLSLICE / Creates new 3D solids and surfaces by slicing, or dividing, existing objects.
SNSNAP / Restricts cursor movement to specified intervals.
SOSOLID / Creates solid-filled triangles and quadrilaterals.
SPSPELL / Checks spelling in a drawing.
SPLSPLINE / Creates a smooth curve that passes through or near specified points.
SPLANESECTIONPLANE / Creates a section object that acts as a cutting plane through 3D objects.
SPLAYSEQUENCEPALY /
SPLITMESHSPLIT / Splits a mesh face into two faces.
SPESPLINEDIT / Edits a spline or spline-fit polyline.
SSMSHEETSET / Opens the Sheet Set Manager.
STSTYLE / Creates, modifies, or specifies text styles.
STASTANDARDS / Manages the association of standards files with drawings.
SUSUBTRACT / Combines selected 3D solids, surfaces, or 2D regions by subtraction.

AutoCAD Keyboard Shortcuts – T Key:
TMTEXT / Creates a multiline text object.
TATABLET / Calibrates, configures, and turns on and off an attached digitizing tablet.
TBTABLE / Creates an empty table object.
TEDITTEXTEDIT / Edits a dimensional constraint, dimension, or text object.
THTHICKNESS /
TITILEMODE /
TOTOOLBAR / Displays, hides, and customizes toolbars.
TOLTOLERANCE /
TORTORUS / Creates a donut-shaped 3D solid.
TPTOOLPALETTES / Opens the Tool Palettes window.
TRTRIM / Trims objects to meet the edges of other objects.
TSTABLESTYLE / Creates, modifies, or specifies table styles.

AutoCAD Keyboard Shortcuts – U-Z Key:
UCUCSMAN / Manages defined user coordinate systems.
UNUNITS / Controls coordinate and angle display formats and precision.
UNHIDEUNISOLATEOBJECTS /
UNISOLATEUNISOLATEOBJECT /
VVIEW / Saves and restores named views, camera views, layout views, and preset views.
VGOVIEWGO / Restores a named view.
VPDDVPOINT / Sets the 3D viewing direction.
VPLAYVIEWPLAY / Plays the animation associated to a named view.
VSVSCURRENT / Sets the visual style in the current viewport.
VSMVISUALSTYLES / Creates and modifies visual styles and applies a visual style to a viewport.
WWBLOCK / Writes objects or a block to a new drawing file.
WEWEDGE / Creates a 3D solid wedge.
WHEELNAVSWHEEL / Displays a wheel that contains a collection of view navigation tools.
XEXPLODE / Breaks a compound object into its component objects.
XAXATTACH / Inserts a DWG file as an external reference (xref).
XBXBIND / Binds one or more definitions of named objects in an xref to the current drawing.
XCXCLIP / Crops the display of a selected external reference or block reference to a specified boundary.
XLXLINE / Creates a line of infinite length.
XRXREF / Starts the EXTERNALREFERENCES command.
ZZOOM / Increases or decreases the magnification of the view in the current viewport.
ZEBRAANALYSISZEBRA       sumber
Read more ...
Tamantekno.tech Designed By Blogger Templates | Our Partner Kangbutojo