answer
stringlengths
15
1.25M
package org.neugen.gui; import org.jdesktop.application.Action; /** * @author Sergei Wolf */ public final class NGAboutBox extends javax.swing.JDialog { private static final long serialVersionUID = 1L; public NGAboutBox(java.awt.Frame parent) { super(parent); initComponents(); getRootPane().setDefaultButton(closeButton); } @Action public void closeAboutBox() { dispose(); } /** * This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { closeButton = new javax.swing.JButton(); javax.swing.JLabel appTitleLabel = new javax.swing.JLabel(); javax.swing.JLabel versionLabel = new javax.swing.JLabel(); javax.swing.JLabel appVersionLabel = new javax.swing.JLabel(); javax.swing.JLabel vendorLabel = new javax.swing.JLabel(); javax.swing.JLabel appVendorLabel = new javax.swing.JLabel(); javax.swing.JLabel homepageLabel = new javax.swing.JLabel(); javax.swing.JLabel appHomepageLabel = new javax.swing.JLabel(); javax.swing.JLabel appDescLabel = new javax.swing.JLabel(); <API key>(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(org.neugen.gui.NeuGenApp.class).getContext().getResourceMap(NGAboutBox.class); setTitle(resourceMap.getString("title")); // NOI18N setModal(true); setName("aboutBox"); // NOI18N setResizable(false); javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(org.neugen.gui.NeuGenApp.class).getContext().getActionMap(NGAboutBox.class, this); closeButton.setAction(actionMap.get("closeAboutBox")); // NOI18N closeButton.setName("closeButton"); // NOI18N appTitleLabel.setFont(appTitleLabel.getFont().deriveFont(appTitleLabel.getFont().getStyle() | java.awt.Font.BOLD, appTitleLabel.getFont().getSize()+4)); appTitleLabel.setText(resourceMap.getString("Application.title")); // NOI18N appTitleLabel.setName("appTitleLabel"); // NOI18N versionLabel.setFont(versionLabel.getFont().deriveFont(versionLabel.getFont().getStyle() | java.awt.Font.BOLD)); versionLabel.setText(resourceMap.getString("versionLabel.text")); // NOI18N versionLabel.setName("versionLabel"); // NOI18N appVersionLabel.setText(resourceMap.getString("Application.version")); // NOI18N appVersionLabel.setName("appVersionLabel"); // NOI18N vendorLabel.setFont(vendorLabel.getFont().deriveFont(vendorLabel.getFont().getStyle() | java.awt.Font.BOLD)); vendorLabel.setText(resourceMap.getString("vendorLabel.text")); // NOI18N vendorLabel.setName("vendorLabel"); // NOI18N appVendorLabel.setText(resourceMap.getString("Application.vendor")); // NOI18N appVendorLabel.setName("appVendorLabel"); // NOI18N homepageLabel.setFont(homepageLabel.getFont().deriveFont(homepageLabel.getFont().getStyle() | java.awt.Font.BOLD)); homepageLabel.setText(resourceMap.getString("homepageLabel.text")); // NOI18N homepageLabel.setName("homepageLabel"); // NOI18N appHomepageLabel.setText(resourceMap.getString("Application.homepage")); // NOI18N appHomepageLabel.setName("appHomepageLabel"); // NOI18N appDescLabel.setText(resourceMap.getString("appDescLabel.text")); // NOI18N appDescLabel.setName("appDescLabel"); // NOI18N org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.<API key>() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(vendorLabel) .add(appTitleLabel) .add(appDescLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE) .add(layout.<API key>() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionLabel) .add(homepageLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(appVendorLabel) .add(appVersionLabel) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(closeButton) .add(appHomepageLabel))))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.<API key>() .addContainerGap() .add(appTitleLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(appDescLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(versionLabel) .add(appVersionLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(layout.<API key>() .add(appVendorLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(appHomepageLabel)) .add(homepageLabel)) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.<API key>() .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(vendorLabel) .add(49, 49, 49)) .add(layout.<API key>() .add(18, 18, 18) .add(closeButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 23, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap()))) ); pack(); }// </editor-fold>//GEN-END:initComponents // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton closeButton; // End of variables declaration//GEN-END:variables }
#ifndef <API key> #define <API key> #include "sagemakerrequest.h" namespace QtAws { namespace SageMaker { class <API key>; class <API key> DeleteAppRequest : public SageMakerRequest { public: DeleteAppRequest(const DeleteAppRequest &other); DeleteAppRequest(); virtual bool isValid() const Q_DECL_OVERRIDE; protected: virtual QtAws::Core::AwsAbstractResponse * response(QNetworkReply * const reply) const Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(DeleteAppRequest) }; } // namespace SageMaker } // namespace QtAws #endif
// This file is auto-generated. Please don't modify it! package org.opencv.video; import java.util.List; import org.opencv.core.Mat; import org.opencv.core.MatOfByte; import org.opencv.core.MatOfFloat; import org.opencv.core.MatOfPoint2f; import org.opencv.core.Rect; import org.opencv.core.RotatedRect; import org.opencv.core.Size; import org.opencv.core.TermCriteria; import org.opencv.utils.Converters; public class Video { public static final int <API key> = 4, <API key> = 8, <API key> = 256, MOTION_TRANSLATION = 0, MOTION_EUCLIDEAN = 1, MOTION_AFFINE = 2, MOTION_HOMOGRAPHY = 3; private static final int <API key> = 4, <API key> = 8; // C++: Mat <API key>(Mat src, Mat dst, bool fullAffine) //javadoc: <API key>(src, dst, fullAffine) public static Mat <API key>(Mat src, Mat dst, boolean fullAffine) { Mat retVal = new Mat(<API key>(src.nativeObj, dst.nativeObj, fullAffine)); return retVal; } // C++: <API key> <API key>(int history = 500, double dist2Threshold = 400.0, bool detectShadows = true) //javadoc: <API key>(history, dist2Threshold, detectShadows) public static <API key> <API key>(int history, double dist2Threshold, boolean detectShadows) { <API key> retVal = new <API key>(<API key>(history, dist2Threshold, detectShadows)); return retVal; } //javadoc: <API key>() public static <API key> <API key>() { <API key> retVal = new <API key>(<API key>()); return retVal; } // C++: <API key> <API key>(int history = 500, double varThreshold = 16, bool detectShadows = true) //javadoc: <API key>(history, varThreshold, detectShadows) public static <API key> <API key>(int history, double varThreshold, boolean detectShadows) { <API key> retVal = new <API key>(<API key>(history, varThreshold, detectShadows)); return retVal; } //javadoc: <API key>() public static <API key> <API key>() { <API key> retVal = new <API key>(<API key>()); return retVal; } // C++: <API key> <API key>() //javadoc: <API key>() public static DualTVL1OpticalFlow <API key>() { DualTVL1OpticalFlow retVal = new DualTVL1OpticalFlow(<API key>()); return retVal; } // C++: RotatedRect CamShift(Mat probImage, Rect& window, TermCriteria criteria) //javadoc: CamShift(probImage, window, criteria) public static RotatedRect CamShift(Mat probImage, Rect window, TermCriteria criteria) { double[] window_out = new double[4]; RotatedRect retVal = new RotatedRect(CamShift_0(probImage.nativeObj, window.x, window.y, window.width, window.height, window_out, criteria.type, criteria.maxCount, criteria.epsilon)); if (window != null) { window.x = (int) window_out[0]; window.y = (int) window_out[1]; window.width = (int) window_out[2]; window.height = (int) window_out[3]; } return retVal; } // C++: double findTransformECC(Mat templateImage, Mat inputImage, Mat& warpMatrix, int motionType = MOTION_AFFINE, TermCriteria criteria = TermCriteria // (TermCriteria::COUNT+TermCriteria::EPS, 50, 0.001), Mat inputMask = Mat()) //javadoc: findTransformECC(templateImage, inputImage, warpMatrix, motionType, criteria, inputMask) public static double findTransformECC(Mat templateImage, Mat inputImage, Mat warpMatrix, int motionType, TermCriteria criteria, Mat inputMask) { double retVal = findTransformECC_0(templateImage.nativeObj, inputImage.nativeObj, warpMatrix.nativeObj, motionType, criteria.type, criteria.maxCount, criteria.epsilon, inputMask.nativeObj); return retVal; } //javadoc: findTransformECC(templateImage, inputImage, warpMatrix, motionType) public static double findTransformECC(Mat templateImage, Mat inputImage, Mat warpMatrix, int motionType) { double retVal = findTransformECC_1(templateImage.nativeObj, inputImage.nativeObj, warpMatrix.nativeObj, motionType); return retVal; } //javadoc: findTransformECC(templateImage, inputImage, warpMatrix) public static double findTransformECC(Mat templateImage, Mat inputImage, Mat warpMatrix) { double retVal = findTransformECC_2(templateImage.nativeObj, inputImage.nativeObj, warpMatrix.nativeObj); return retVal; } // C++: int <API key>(Mat img, vector_Mat& pyramid, Size winSize, int maxLevel, bool withDerivatives = true, int pyrBorder = BORDER_REFLECT_101, int // derivBorder = BORDER_CONSTANT, bool tryReuseInputImage = true) //javadoc: <API key>(img, pyramid, winSize, maxLevel, withDerivatives, pyrBorder, derivBorder, tryReuseInputImage) public static int <API key>(Mat img, List<Mat> pyramid, Size winSize, int maxLevel, boolean withDerivatives, int pyrBorder, int derivBorder, boolean tryReuseInputImage) { Mat pyramid_mat = new Mat(); int retVal = <API key>(img.nativeObj, pyramid_mat.nativeObj, winSize.width, winSize.height, maxLevel, withDerivatives, pyrBorder, derivBorder, tryReuseInputImage); Converters.Mat_to_vector_Mat(pyramid_mat, pyramid); pyramid_mat.release(); return retVal; } //javadoc: <API key>(img, pyramid, winSize, maxLevel) public static int <API key>(Mat img, List<Mat> pyramid, Size winSize, int maxLevel) { Mat pyramid_mat = new Mat(); int retVal = <API key>(img.nativeObj, pyramid_mat.nativeObj, winSize.width, winSize.height, maxLevel); Converters.Mat_to_vector_Mat(pyramid_mat, pyramid); pyramid_mat.release(); return retVal; } // C++: int meanShift(Mat probImage, Rect& window, TermCriteria criteria) //javadoc: meanShift(probImage, window, criteria) public static int meanShift(Mat probImage, Rect window, TermCriteria criteria) { double[] window_out = new double[4]; int retVal = meanShift_0(probImage.nativeObj, window.x, window.y, window.width, window.height, window_out, criteria.type, criteria.maxCount, criteria.epsilon); if (window != null) { window.x = (int) window_out[0]; window.y = (int) window_out[1]; window.width = (int) window_out[2]; window.height = (int) window_out[3]; } return retVal; } // C++: void <API key>(Mat prev, Mat next, Mat& flow, double pyr_scale, int levels, int winsize, int iterations, int poly_n, double poly_sigma, int flags) //javadoc: <API key>(prev, next, flow, pyr_scale, levels, winsize, iterations, poly_n, poly_sigma, flags) public static void <API key>(Mat prev, Mat next, Mat flow, double pyr_scale, int levels, int winsize, int iterations, int poly_n, double poly_sigma, int flags) { <API key>(prev.nativeObj, next.nativeObj, flow.nativeObj, pyr_scale, levels, winsize, iterations, poly_n, poly_sigma, flags); return; } // C++: void <API key>(Mat prevImg, Mat nextImg, vector_Point2f prevPts, vector_Point2f& nextPts, vector_uchar& status, vector_float& err, Size winSize = Size // (21,21), int maxLevel = 3, TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 0.01), int flags = 0, double minEigThreshold = 1e-4) //javadoc: <API key>(prevImg, nextImg, prevPts, nextPts, status, err, winSize, maxLevel, criteria, flags, minEigThreshold) public static void <API key>(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err, Size winSize, int maxLevel, TermCriteria criteria, int flags, double minEigThreshold) { Mat prevPts_mat = prevPts; Mat nextPts_mat = nextPts; Mat status_mat = status; Mat err_mat = err; <API key>(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj, winSize.width, winSize.height, maxLevel, criteria.type, criteria.maxCount, criteria.epsilon, flags, minEigThreshold); return; } //javadoc: <API key>(prevImg, nextImg, prevPts, nextPts, status, err, winSize, maxLevel) public static void <API key>(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err, Size winSize, int maxLevel) { Mat prevPts_mat = prevPts; Mat nextPts_mat = nextPts; Mat status_mat = status; Mat err_mat = err; <API key>(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj, winSize.width, winSize.height, maxLevel); return; } //javadoc: <API key>(prevImg, nextImg, prevPts, nextPts, status, err) public static void <API key>(Mat prevImg, Mat nextImg, MatOfPoint2f prevPts, MatOfPoint2f nextPts, MatOfByte status, MatOfFloat err) { Mat prevPts_mat = prevPts; Mat nextPts_mat = nextPts; Mat status_mat = status; Mat err_mat = err; <API key>(prevImg.nativeObj, nextImg.nativeObj, prevPts_mat.nativeObj, nextPts_mat.nativeObj, status_mat.nativeObj, err_mat.nativeObj); return; } // C++: Mat <API key>(Mat src, Mat dst, bool fullAffine) private static native long <API key>(long src_nativeObj, long dst_nativeObj, boolean fullAffine); // C++: <API key> <API key>(int history = 500, double dist2Threshold = 400.0, bool detectShadows = true) private static native long <API key>(int history, double dist2Threshold, boolean detectShadows); private static native long <API key>(); // C++: <API key> <API key>(int history = 500, double varThreshold = 16, bool detectShadows = true) private static native long <API key>(int history, double varThreshold, boolean detectShadows); private static native long <API key>(); // C++: <API key> <API key>() private static native long <API key>(); // C++: RotatedRect CamShift(Mat probImage, Rect& window, TermCriteria criteria) private static native double[] CamShift_0(long probImage_nativeObj, int window_x, int window_y, int window_width, int window_height, double[] window_out, int criteria_type, int criteria_maxCount, double criteria_epsilon); // C++: double findTransformECC(Mat templateImage, Mat inputImage, Mat& warpMatrix, int motionType = MOTION_AFFINE, TermCriteria criteria = TermCriteria // (TermCriteria::COUNT+TermCriteria::EPS, 50, 0.001), Mat inputMask = Mat()) private static native double findTransformECC_0(long <API key>, long <API key>, long <API key>, int motionType, int criteria_type, int criteria_maxCount, double criteria_epsilon, long inputMask_nativeObj); private static native double findTransformECC_1(long <API key>, long <API key>, long <API key>, int motionType); private static native double findTransformECC_2(long <API key>, long <API key>, long <API key>); // C++: int <API key>(Mat img, vector_Mat& pyramid, Size winSize, int maxLevel, bool withDerivatives = true, int pyrBorder = BORDER_REFLECT_101, int // derivBorder = BORDER_CONSTANT, bool tryReuseInputImage = true) private static native int <API key>(long img_nativeObj, long <API key>, double winSize_width, double winSize_height, int maxLevel, boolean withDerivatives, int pyrBorder, int derivBorder, boolean tryReuseInputImage); private static native int <API key>(long img_nativeObj, long <API key>, double winSize_width, double winSize_height, int maxLevel); // C++: int meanShift(Mat probImage, Rect& window, TermCriteria criteria) private static native int meanShift_0(long probImage_nativeObj, int window_x, int window_y, int window_width, int window_height, double[] window_out, int criteria_type, int criteria_maxCount, double criteria_epsilon); // C++: void <API key>(Mat prev, Mat next, Mat& flow, double pyr_scale, int levels, int winsize, int iterations, int poly_n, double poly_sigma, int flags) private static native void <API key>(long prev_nativeObj, long next_nativeObj, long flow_nativeObj, double pyr_scale, int levels, int winsize, int iterations, int poly_n, double poly_sigma, int flags); // C++: void <API key>(Mat prevImg, Mat nextImg, vector_Point2f prevPts, vector_Point2f& nextPts, vector_uchar& status, vector_float& err, Size winSize = Size // (21,21), int maxLevel = 3, TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 0.01), int flags = 0, double minEigThreshold = 1e-4) private static native void <API key>(long prevImg_nativeObj, long nextImg_nativeObj, long <API key>, long <API key>, long <API key>, long err_mat_nativeObj, double winSize_width, double winSize_height, int maxLevel, int criteria_type, int criteria_maxCount, double criteria_epsilon, int flags, double minEigThreshold); private static native void <API key>(long prevImg_nativeObj, long nextImg_nativeObj, long <API key>, long <API key>, long <API key>, long err_mat_nativeObj, double winSize_width, double winSize_height, int maxLevel); private static native void <API key>(long prevImg_nativeObj, long nextImg_nativeObj, long <API key>, long <API key>, long <API key>, long err_mat_nativeObj); }
FILE(REMOVE_RECURSE "CommonBehavior.cpp" "CommonBehavior.h" "RGBD.cpp" "RGBD.h" "JointMotor.cpp" "JointMotor.h" "DifferentialRobot.cpp" "DifferentialRobot.h" "moc_specificworker.cxx" "moc_specificmonitor.cxx" "moc_genericmonitor.cxx" "moc_commonbehaviorI.cxx" "moc_genericworker.cxx" "ui_mainUI.h" "CMakeFiles/trainCNN.dir/specificworker.cpp.o" "CMakeFiles/trainCNN.dir/specificmonitor.cpp.o" "CMakeFiles/trainCNN.dir/opt/robocomp/classes/rapplication/rapplication.cpp.o" "CMakeFiles/trainCNN.dir/opt/robocomp/classes/qlog/qlog.cpp.o" "CMakeFiles/trainCNN.dir/main.cpp.o" "CMakeFiles/trainCNN.dir/genericmonitor.cpp.o" "CMakeFiles/trainCNN.dir/commonbehaviorI.cpp.o" "CMakeFiles/trainCNN.dir/genericworker.cpp.o" "CMakeFiles/trainCNN.dir/CommonBehavior.cpp.o" "CMakeFiles/trainCNN.dir/RGBD.cpp.o" "CMakeFiles/trainCNN.dir/JointMotor.cpp.o" "CMakeFiles/trainCNN.dir/DifferentialRobot.cpp.o" "CMakeFiles/trainCNN.dir/moc_specificworker.cxx.o" "CMakeFiles/trainCNN.dir/moc_specificmonitor.cxx.o" "CMakeFiles/trainCNN.dir/moc_genericmonitor.cxx.o" "CMakeFiles/trainCNN.dir/moc_commonbehaviorI.cxx.o" "CMakeFiles/trainCNN.dir/moc_genericworker.cxx.o" "../bin/trainCNN.pdb" "../bin/trainCNN" ) # Per-language clean rules from dependency scanning. FOREACH(lang CXX) INCLUDE(CMakeFiles/trainCNN.dir/cmake_clean_${lang}.cmake OPTIONAL) ENDFOREACH(lang)
package net.sf.hajdbc.sql.io; import java.io.OutputStream; import java.sql.SQLException; import java.util.Map; import net.sf.hajdbc.Database; import net.sf.hajdbc.invocation.Invoker; import net.sf.hajdbc.sql.ProxyFactory; /** * @author Paul Ferraro */ public class <API key><Z, D extends Database<Z>, P> extends OutputProxyFactory<Z, D, P, OutputStream> { public <API key>(P parentProxy, ProxyFactory<Z, D, P, SQLException> parent, Invoker<Z, D, P, OutputStream, SQLException> invoker, Map<D, OutputStream> outputs) { super(parentProxy, parent, invoker, outputs); } @Override public OutputStream createProxy() { return new OutputStreamProxy<>(this); } }
package org.fenixedu.academic.domain.accounting; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Optional; import java.util.Set; import java.util.stream.Stream; import org.apache.commons.lang.StringUtils; import org.fenixedu.academic.domain.Person; import org.fenixedu.academic.domain.exceptions.DomainException; import org.fenixedu.academic.domain.exceptions.<API key>; import org.fenixedu.academic.domain.<API key>.Party; import org.fenixedu.academic.util.LabelFormatter; import org.fenixedu.academic.util.Money; import org.fenixedu.bennu.core.domain.Bennu; import org.fenixedu.bennu.core.domain.User; import org.fenixedu.bennu.core.security.Authenticate; import org.fenixedu.bennu.core.signals.DomainObjectEvent; import org.fenixedu.bennu.core.signals.Signal; import org.joda.time.DateTime; import org.joda.time.LocalDate; import org.joda.time.YearMonthDay; /** * Two-ledged accounting transaction * * @author naat * */ public class <API key> extends <API key> { public static final String SIGNAL_ANNUL = <API key>.class.getName() + ".annul"; public static Comparator<<API key>> <API key> = (<API key>, <API key>) -> { int comparationResult = <API key>.getWhenRegistered().compareTo(<API key>.getWhenRegistered()); return (comparationResult == 0) ? <API key>.getExternalId().compareTo( <API key>.getExternalId()) : comparationResult; }; protected <API key>() { super(); super.setRootDomainObject(Bennu.getInstance()); } public <API key>(User responsibleUser, Event event, Entry debit, Entry credit, <API key> transactionDetail) { this(); init(responsibleUser, event, debit, credit, transactionDetail); } private <API key>(User responsibleUser, Entry debit, Entry credit, <API key> transactionDetail, <API key> transactionToAdjust) { this(); init(responsibleUser, transactionToAdjust.getEvent(), debit, credit, transactionDetail, transactionToAdjust); } protected void init(User responsibleUser, Event event, Entry debit, Entry credit, <API key> transactionDetail) { init(responsibleUser, event, debit, credit, transactionDetail, null); } protected void init(User responsibleUser, Event event, Entry debit, Entry credit, <API key> transactionDetail, <API key> transactionToAdjust) { checkParameters(event, debit, credit); // check for operations after registered date List<String> operationsAfter = event.getOperationsAfter(transactionDetail.getWhenProcessed()); if (!operationsAfter.isEmpty()) { throw new DomainException("error.accounting.<API key>.cannot.create.transaction", String.join(",", operationsAfter)); } super.setEvent(event); super.setResponsibleUser(responsibleUser); super.addEntries(debit); super.addEntries(credit); super.<API key>(transactionToAdjust); super.<API key>(transactionDetail); } private void checkParameters(Event event, Entry debit, Entry credit) { if (event == null) { throw new DomainException("error.accounting.<API key>.event.cannot.be.null"); } if (debit == null) { throw new DomainException("error.accounting.<API key>.debit.cannot.be.null"); } if (credit == null) { throw new DomainException("error.accounting.<API key>.credit.cannot.be.null"); } } @Override public void addEntries(Entry entries) { throw new DomainException("error.accounting.<API key>.cannot.add.entries"); } @Override public Set<Entry> getEntriesSet() { return Collections.unmodifiableSet(super.getEntriesSet()); } @Override public void removeEntries(Entry entries) { throw new DomainException("error.accounting.<API key>.cannot.remove.entries"); } @Override public void setEvent(Event event) { super.setEvent(event); } @Override public void setResponsibleUser(User responsibleUser) { throw new DomainException("error.accounting.<API key>.cannot.modify.responsibleUser"); } @Override public void <API key>(<API key> adjustedTransaction) { throw new DomainException("error.accounting.<API key>.cannot.modify.adjustedTransaction"); } @Override public void <API key>(<API key> transactionDetail) { throw new DomainException("error.accounting.<API key>.cannot.modify.transactionDetail"); } @Override public void <API key>(<API key> <API key>) { throw new DomainException( "error.org.fenixedu.academic.domain.accounting.<API key>.cannot.add.<API key>"); } @Override public Set<<API key>> <API key>() { return Collections.unmodifiableSet(super.<API key>()); } public Stream<<API key>> <API key>() { return super.<API key>().stream(); } @Override public void <API key>(<API key> <API key>) { throw new DomainException( "error.org.fenixedu.academic.domain.accounting.<API key>.cannot.remove.<API key>"); } public LabelFormatter <API key>(EntryType entryType) { return getEvent().<API key>(entryType); } public Account getFromAccount() { return getEntry(false).getAccount(); } public Account getToAccount() { return getEntry(true).getAccount(); } public Entry getToAccountEntry() { return getEntry(true); } public Entry getFromAccountEntry() { return getEntry(false); } private Entry getEntry(boolean positive) { for (final Entry entry : super.getEntriesSet()) { if (entry.isPositiveAmount() == positive) { return entry; } } throw new DomainException("error.accounting.<API key>.transaction.data.is.corrupted"); } public <API key> reimburse(User responsibleUser, PaymentMethod paymentMethod,String paymentReference, Money amountToReimburse) { return reimburse(responsibleUser, paymentMethod,paymentReference, amountToReimburse, null); } public <API key> reimburse(User responsibleUser, PaymentMethod paymentMethod, String paymentReference, Money amountToReimburse, String comments) { return reimburse(responsibleUser, paymentMethod, paymentReference, amountToReimburse, comments, true); } public <API key> reimburse(User responsibleUser, PaymentMethod paymentMethod, String paymentReference, Money amountToReimburse, DateTime reimburseDate, String comments) { return reimburse(responsibleUser, paymentMethod, paymentReference, amountToReimburse, comments, true, reimburseDate); } public <API key> <API key>(User responsibleUser, PaymentMethod paymentMethod, String paymentReference, Money amountToReimburse) { return <API key>(responsibleUser, paymentMethod, paymentReference, amountToReimburse, null); } public <API key> <API key>(User responsibleUser, PaymentMethod paymentMethod, String paymentReference, Money amountToReimburse, String comments) { return reimburse(responsibleUser, paymentMethod, paymentReference, amountToReimburse, comments, false); } public void annul(final User responsibleUser, final String reason) { if (StringUtils.isEmpty(reason)) { throw new DomainException( "error.org.fenixedu.academic.domain.accounting.<API key>.cannot.annul.without.reason"); } checkRulesToAnnul(); annulReceipts(); Signal.emit(SIGNAL_ANNUL, new DomainObjectEvent<<API key>>(this)); <API key>(responsibleUser, <API key>().getPaymentMethod(), <API key>() .getPaymentReference(), <API key>(), reason); } private void checkRulesToAnnul() { final List<String> operationsAfter = getEvent().getOperationsAfter(getWhenProcessed()); if (!operationsAfter.isEmpty()) { throw new DomainException("error.accounting.<API key>.cannot.annul.operations.after", String.join(",", operationsAfter)); } } private void annulReceipts() { getToAccountEntry().getReceiptsSet().stream().filter(Receipt::isActive).forEach(r -> { Person responsible = Optional.ofNullable(Authenticate.getUser()).map(User::getPerson).orElse(null); r.annul(responsible); }); } private <API key> reimburse(User responsibleUser, PaymentMethod paymentMethod, String paymentReference, Money amountToReimburse, String comments, boolean checkRules) { return reimburse(responsibleUser, paymentMethod, paymentReference, amountToReimburse, comments, checkRules, new DateTime ()); } private <API key> reimburse(User responsibleUser, PaymentMethod paymentMethod, String paymentReference, Money amountToReimburse, String comments, boolean checkRules, DateTime reimburseDate) { if (checkRules && !<API key>(amountToReimburse)) { throw new DomainException("error.accounting.<API key>.cannot.reimburse.events.that.may.open"); } if (!getToAccountEntry().<API key>(amountToReimburse)) { throw new <API key>( "error.accounting.<API key>.amount.to.reimburse.exceeds.entry.amount", getToAccountEntry() .getDescription()); } final <API key> transaction = new <API key>(responsibleUser, new Entry(EntryType.ADJUSTMENT, amountToReimburse.negate(), getToAccount()), new Entry(EntryType.ADJUSTMENT, amountToReimburse, getFromAccount()), new <API key>(reimburseDate, paymentMethod, paymentReference, comments), this); getEvent().recalculateState(new DateTime()); return transaction; } public DateTime getWhenRegistered() { return <API key>().getWhenRegistered(); } public DateTime getWhenProcessed() { return <API key>().getWhenProcessed(); } public String getComments() { return <API key>().getComments(); } public boolean isPayed(final int civilYear) { return getWhenRegistered().getYear() == civilYear; } public boolean <API key>() { return <API key>() != null; } public boolean hasBeenAdjusted() { return !super.<API key>().isEmpty(); } public Entry getEntryFor(final Account account) { for (final Entry accountingEntry : super.getEntriesSet()) { if (accountingEntry.getAccount() == account) { return accountingEntry; } } throw new DomainException( "error.accounting.<API key>.transaction.data.is.corrupted.because.no.entry.belongs.to.account"); } private boolean <API key>(final Money amount) { return getEvent().<API key>(amount); } public boolean <API key>(Party party) { return getFromAccount().getParty() == party; } @Override protected void <API key>(Collection<String> blockers) { super.<API key>(blockers); blockers.addAll(getEvent().getOperationsAfter(getWhenProcessed())); } public void delete() { DomainException.<API key>(getDeletionBlockers()); super.<API key>(null); for (; !<API key>().isEmpty(); <API key>().iterator().next().delete()) { ; } if (<API key>() != null) { <API key>().delete(); } for (; !getEntriesSet().isEmpty(); getEntriesSet().iterator().next().delete()) { ; } super.setResponsibleUser(null); super.setEvent(null); setRootDomainObject(null); super.deleteDomainObject(); } public Money <API key>() { return getToAccountEntry().<API key>(); } public boolean isInsidePeriod(final YearMonthDay startDate, final YearMonthDay endDate) { return isInsidePeriod(startDate.toLocalDate(), endDate.toLocalDate()); } public boolean isInsidePeriod(final LocalDate startDate, final LocalDate endDate) { return !getWhenRegistered().toLocalDate().isBefore(startDate) && !getWhenRegistered().toLocalDate().isAfter(endDate); } public boolean isInstallment() { return false; } public PaymentMethod getPaymentMethod() { return <API key>().getPaymentMethod(); } public Money getOriginalAmount() { return getToAccountEntry().getOriginalAmount(); } }
package net.amygdalum.testrecorder.profile; import static org.assertj.core.api.Assertions.assertThat; import java.io.<API key>; import java.io.<API key>; import java.io.IOException; import java.net.URL; import java.nio.file.Path; import java.util.Enumeration; import java.util.stream.Stream; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import net.amygdalum.testrecorder.util.<API key>; import net.amygdalum.testrecorder.util.LogLevel; import net.amygdalum.testrecorder.util.LoggerExtension; public class <API key> { @Nested class testLoad { @Test void common() throws Exception { <API key> classLoader = new <API key>(<API key>.class.getClassLoader()); classLoader.defineResource("agentconfig/net.amygdalum.testrecorder.profile.<API key>", "net.amygdalum.testrecorder.profile.<API key>".getBytes()); <API key> loader = new <API key>(classLoader); assertThat(loader.load(<API key>.class).findFirst()).containsInstanceOf(<API key>.class); } @ExtendWith(LoggerExtension.class) @Test void <API key>(@LogLevel("error") <API key> error) throws Exception { <API key> classLoader = new <API key>(<API key>.class.getClassLoader()) { @Override public Enumeration<URL> getResources(String name) throws IOException { throw new IOException(); } }; classLoader.defineResource("agentconfig/net.amygdalum.testrecorder.profile.<API key>", "net.amygdalum.testrecorder.profile.<API key>".getBytes()); <API key> loader = new <API key>(classLoader); assertThat(loader.load(<API key>.class).findFirst()).isNotPresent(); assertThat(error.toString()).contains("cannot load configuration from classpath"); } @ExtendWith(LoggerExtension.class) @Test void withFileNotFound(@LogLevel("debug") <API key> debug) throws Exception { <API key> classLoader = new <API key>(<API key>.class.getClassLoader()); classLoader.defineResource("agentconfig/net.amygdalum.testrecorder.profile.<API key>", "net.amygdalum.testrecorder.profile.<API key>".getBytes()); <API key> loader = new <API key>(classLoader) { @Override protected <T> Stream<T> configsFrom(Path path, Class<T> clazz, Object[] args) throws IOException { throw new <API key>(); } }; assertThat(loader.load(<API key>.class).findFirst()).isNotPresent(); assertThat(debug.toString()).contains("did not find configuration file"); } @ExtendWith(LoggerExtension.class) @Test void withIOException(@LogLevel("error") <API key> error) throws Exception { <API key> classLoader = new <API key>(<API key>.class.getClassLoader()); classLoader.defineResource("agentconfig/net.amygdalum.testrecorder.profile.<API key>", "net.amygdalum.testrecorder.profile.<API key>".getBytes()); <API key> loader = new <API key>(classLoader) { @Override protected <T> Stream<T> configsFrom(Path path, Class<T> clazz, Object[] args) throws IOException { throw new IOException(); } }; assertThat(loader.load(<API key>.class).findFirst()).isNotPresent(); assertThat(error.toString()).contains("cannot load configuration file"); } } }
#ifndef <API key> #define <API key> #include "<API key>.h" namespace QtAws { namespace <API key> { class <API key>; class <API key> TagResourceRequest : public <API key> { public: TagResourceRequest(const TagResourceRequest &other); TagResourceRequest(); virtual bool isValid() const Q_DECL_OVERRIDE; protected: virtual QtAws::Core::AwsAbstractResponse * response(QNetworkReply * const reply) const Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(TagResourceRequest) }; } // namespace <API key> } // namespace QtAws #endif
package net.sourceforge.plantuml.graphic; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.ugraphic.UChangeBackColor; import net.sourceforge.plantuml.ugraphic.UChangeColor; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.URectangle; import net.sourceforge.plantuml.ugraphic.UStroke; public class TextBlockGeneric implements TextBlock { private final TextBlock textBlock; private final HtmlColor background; private final HtmlColor border; public TextBlockGeneric(TextBlock textBlock, HtmlColor background, HtmlColor border) { this.textBlock = textBlock; this.border = border; this.background = background; } public Dimension2D calculateDimension(StringBounder stringBounder) { final Dimension2D dim = textBlock.calculateDimension(stringBounder); return dim; } public void drawU(UGraphic ug) { ug = ug.apply(new UChangeBackColor(background)); ug = ug.apply(new UChangeColor(border)); final Dimension2D dim = calculateDimension(ug.getStringBounder()); ug.apply(new UStroke(2, 2, 1)).draw(new URectangle(dim.getWidth(), dim.getHeight())); textBlock.drawU(ug); } }
package org.sonar.server.authentication.ws; import org.junit.Test; import org.sonar.core.platform.ListContainer; import static org.assertj.core.api.Assertions.assertThat; public class <API key> { @Test public void <API key>() { ListContainer container = new ListContainer(); new <API key>().configure(container); assertThat(container.getAddedObjects()).hasSize(4); } }
#ifndef <API key> #define <API key> // Headers #include <sgl/detail/common.h> #define <API key>(value) \ _Generic( (value), \ float: true, \ double: true, \ long double: true, \ default: false \ ) #endif // <API key>
<?php /* This file is part of the RainbowPHP package. If you think this file is lost, */ /* please send it to anyone kind enough to take care of it. Thank you. */ /* email : bperche9@gmail.com */ /* file that was distributed with this source code. */ namespace RainbowPHP\Generator; use RainbowPHP\DataProvider\<API key>; use RainbowPHP\File\<API key>; use RainbowPHP\Formatter\FormatterInterface; use RainbowPHP\Formatter\LineFormatter; use RainbowPHP\Transformer\<API key>; /** * Class FileGenerator * @package RainbowPHP\Generator * @author Benjamin Perche <bperche9@gmail.com> */ class FileGenerator implements <API key> { protected $fileHandler; protected $transformer; protected $dataProvider; protected $formatter; public function __construct( <API key> $fileHandler, <API key> $transformer, <API key> $dataProvider, FormatterInterface $formatter = null ) { $this->fileHandler = $fileHandler; $this->transformer = $transformer; $this->dataProvider = $dataProvider; $this->formatter = $formatter ?: new LineFormatter(); } public function generateFile() { foreach ($this->dataProvider->generate() as $value) { if (null !== $value) { $this->fileHandler->writeLine($this->formatter->format($value, $this->transformer->transform($value))); } } } }
#ifndef BOX_H #define BOX_H #include "utils/geometry.h" template <typename T, size_t K> class Box : public Geometry<T, K> { public: template <typename... P> inline Box(const P&... parameters); inline ~Box(); inline Box& operator=(const Box<T, K>& src); }; #include "utils/box.tpp" #endif
#ifndef <API key> #define <API key> #include "codecommitrequest.h" namespace QtAws { namespace CodeCommit { class <API key>; class <API key> <API key> : public CodeCommitRequest { public: <API key>(const <API key> &other); <API key>(); virtual bool isValid() const Q_DECL_OVERRIDE; protected: virtual QtAws::Core::AwsAbstractResponse * response(QNetworkReply * const reply) const Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(<API key>) }; } // namespace CodeCommit } // namespace QtAws #endif
<?php namespace pocketmine\entity; use pocketmine\item\Item as ItemItem; use pocketmine\nbt\tag\IntTag; class Slime extends Monster{ const NETWORK_ID = self::SLIME; const DATA_SIZE = 16; public $height = 2; public $width = 2; public $lenght = 2;//TODO: Size protected $exp_min = 1; protected $exp_max = 1;//TODO: Size public function initEntity(){ $this->setMaxHealth(1); parent::initEntity(); if (!isset($this->namedtag->Size)){ $this->setSize(mt_rand(0, 3)); } $this->setSize($this->getSize()); } public function getName(): string{ return "Slime"; } public function getDrops(): array{ return [ ItemItem::get(ItemItem::SLIMEBALL, 0, mt_rand(0, 2)) ]; } public function setSize($value){ $this->namedtag->Size = new IntTag("Size", $value); $this->setDataProperty(self::DATA_SIZE, self::DATA_TYPE_INT, $value); } public function getSize(){ return $this->namedtag["Size"]; } }
using System.Globalization; using System.ServiceProcess; using System.Threading; using Castle.Core.Logging; using Consumentor.ShopGun.Component; using Consumentor.ShopGun.Configuration; namespace Consumentor.ShopGun.Services { public abstract class ServiceHostBase : ServiceBase { public abstract void OnStartService(string[] args); public abstract void OnStopService(); protected IContainer IocContainer { get; private set; } protected ServiceHostBase(IContainer iocContainer, string serviceName) { IocContainer = iocContainer; ServiceName = serviceName; } public ILogger Log { get; set; } protected override void OnStart(string[] args) { Log.Debug("Service OnStart"); SetCultureInfo(); OnStartService(args); base.OnStart(args); } protected void SetCultureInfo() { var <API key> = IocContainer.Resolve<<API key>>(); Thread.CurrentThread.CurrentCulture = <API key>.CultureInfo; Thread.CurrentThread.CurrentUICulture = <API key>.UICulture; Log.Debug("Service {0} started with CurrentCulture: {1}", ServiceName, CultureInfo.CurrentCulture.ToString()); Log.Debug("Service {0} started with CurrentUICulture: {1}", ServiceName, CultureInfo.CurrentUICulture.ToString()); } protected override void OnStop() { Log.Debug("Service OnStop"); OnStopService(); base.OnStop(); } } }
#include "GAPhysicsBaseTemp.h" GAPhysicsBase::GAPhysicsBase() { } int GAPhysicsBase::testCollideWith(GAPhysicsBase* object2,GAVector3& collidePoint) { return 0; } GALine::GALine() { p1=GAVector3(0,0,0); p2=GAVector3(1,1,1); } GALine::GALine(GAVector3 p1_,GAVector3 p2_) { p1=p1_; p2=p2_; } GASegment::GASegment() { pstart=GAVector3(0,0,0); pend=GAVector3(1,1,1); } GASegment::GASegment(GAVector3 pstart_,GAVector3 pend_) { pstart=pstart_; pend=pend_; } GAPlane::GAPlane() { } int GAPlane::testCollideWith(GAPhysicsBase* object2,GAVector3& collidePoint) { return 0; } GACube::GACube() { } int GACube::testCollideWith(GAPhysicsBase* object2,GAVector3& collidePoint) { return 0; } int GACube::testCollideWithCube(GACube* object2,GAVector3& collidePoint) { return 0; }
#ifndef <API key> #define <API key> #include "route53request.h" namespace QtAws { namespace Route53 { class <API key>; class QTAWSROUTE53_EXPORT <API key> : public Route53Request { public: <API key>(const <API key> &other); <API key>(); virtual bool isValid() const Q_DECL_OVERRIDE; protected: virtual QtAws::Core::AwsAbstractResponse * response(QNetworkReply * const reply) const Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(<API key>) }; } // namespace Route53 } // namespace QtAws #endif
package biblivre.core; import java.io.File; import java.util.LinkedList; import org.json.JSONArray; public class <API key><T extends IFJson> extends LinkedList<T> implements <API key> { private static final long serialVersionUID = 1L; private String variable; private String prefix; private String suffix; private JavascriptCache cache; public <API key>(String variable, String prefix, String suffix) { this.variable = variable; this.prefix = prefix; this.suffix = suffix; } @Override public String <API key>() { return this.prefix; } @Override public String <API key>() { return this.suffix; } @Override public String toJavascriptString() { JSONArray array = new JSONArray(); for (T el : this) { array.put(el.toJSONObject()); } return this.variable + " = " + array.toString() + ";"; } @Override public File getCacheFile() { if (this.cache == null) { this.cache = new JavascriptCache(this); } return this.cache.getCacheFile(); } @Override public String getCacheFileName() { if (this.cache == null) { this.cache = new JavascriptCache(this); } return this.cache.getFileName(); } @Override public void invalidateCache() { this.cache = null; } }
package yaycrawler.admin; import org.springframework.boot.builder.<API key>; import org.springframework.boot.context.web.<API key>; public class ServletInitializer extends <API key> { @Override protected <API key> configure(<API key> application) { return application.sources(Application.class); } }
// MySQL Connectors. There are special exceptions to the terms and // conditions of the GPLv2 as it is applied to this software, see the // This program is free software; you can redistribute it and/or modify // This program is distributed in the hope that it will be useful, but // for more details. // with this program; if not, write to the Free Software Foundation, Inc., // 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA using System; using System.Collections.Generic; using System.Data.Common; using System.Security; using System.Security.Permissions; namespace MySql.Data.MySqlClient { [Serializable, AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Struct | AttributeTargets.Class | AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)] public sealed class <API key> : <API key> { // Methods public <API key>(SecurityAction action) : base(action) { } public override IPermission CreatePermission() { return new <API key>(this); } } }
using System; using System.Linq; using System.Threading; using System.Web.Mvc; using Arashi.Core; using Arashi.Core.Domain; using Arashi.Services.Localization; namespace Arashi.Web.Mvc.Views { public abstract class <API key> : WebViewPage //ViewUserControl { private <API key> localizationService; <summary> Constructor </summary> protected <API key>() { localizationService = IoC.Resolve<<API key>>(); } <summary> Get the current RequestContext </summary> public IRequestContext RequestContext { get { if (ViewData.ContainsKey("Context") && ViewData["Context"] != null) return ViewData["Context"] as IRequestContext; else return null; } } #region Localization Support <summary> Get a localized global resource </summary> <param name="token"></param> <returns></returns> protected string GlobalResource(string token) { return localizationService.GlobalResource(token, Thread.CurrentThread.CurrentUICulture); } <summary> Get a localized global resource filled with format parameters </summary> <param name="token"></param> <param name="args"></param> <returns></returns> protected string GlobalResource(string token, params object[] args) { return string.Format(GlobalResource(token), args); } #endregion } public abstract class <API key><TModel> : WebViewPage<TModel> // ViewUserControl<TModel> where TModel : class { private <API key> localizationService; <summary> Constructor </summary> protected <API key>() { localizationService = IoC.Resolve<<API key>>(); } <summary> Get the current RequestContext </summary> public IRequestContext RequestContext { get { if (ViewData.ContainsKey("Context") && ViewData["Context"] != null) return ViewData["Context"] as IRequestContext; else return null; } } #region Localization Support <summary> Get a localized global resource </summary> <param name="token"></param> <returns></returns> protected string GlobalResource(string token) { return localizationService.GlobalResource(token, Thread.CurrentThread.CurrentUICulture); } <summary> Get a localized global resource filled with format parameters </summary> <param name="token"></param> <param name="args"></param> <returns></returns> protected string GlobalResource(string token, params object[] args) { return string.Format(GlobalResource(token), args); } #endregion } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Collections; using KSP; using KSP.IO; using UnityEngine; namespace Kopernicus.Configuration { public class ConfigReader { [Persistent] public bool EnforceShaders = false; [Persistent] public bool WarnShaders = false; [Persistent] public int EnforcedShaderLevel = 2; [Persistent] public int ScatterCullDistance = 5000; [Persistent] public string <API key> = "True"; [Persistent] public int SolarRefreshRate = 1; public UrlDir.UrlConfig[] baseConfigs; public void loadMainSettings() { baseConfigs = GameDatabase.Instance.GetConfigs("Kopernicus_config"); if (baseConfigs.Length == 0) { Debug.LogWarning("No Kopernicus_Config file found, using defaults"); return; } if (baseConfigs.Length > 1) { Debug.LogWarning("Multiple Kopernicus_Config files detected, check your install"); } try { ConfigNode.<API key>(this, baseConfigs[0].config); } catch { Debug.LogWarning("Error loading config, using defaults"); } } } }
<?php namespace pocketmine\entity; use pocketmine\nbt\tag\String; class Creeper extends Monster implements Explosive{ protected function initEntity(){ $this->namedtag->id = new String("id", "Creeper"); } }
#include "dropbox/users/UsersFullAccount.h" using namespace dropboxQt; namespace dropboxQt{ namespace users{ FullAccount FullAccount::operator QJsonObject()const{ QJsonObject js; this->toJson(js); return js; } void FullAccount::toJson(QJsonObject& js)const{ Account::toJson(js); if(!m_country.isEmpty()) js["country"] = QString(m_country); if(!m_locale.isEmpty()) js["locale"] = QString(m_locale); if(!m_referral_link.isEmpty()) js["referral_link"] = QString(m_referral_link); js["team"] = (QJsonObject)m_team; if(!m_team_member_id.isEmpty()) js["team_member_id"] = QString(m_team_member_id); js["is_paired"] = m_is_paired; m_account_type.toJson(js, "account_type"); } void FullAccount::fromJson(const QJsonObject& js){ Account::fromJson(js); m_country = js["country"].toString(); m_locale = js["locale"].toString(); m_referral_link = js["referral_link"].toString(); m_team.fromJson(js["team"].toObject()); m_team_member_id = js["team_member_id"].toString(); m_is_paired = js["is_paired"].toVariant().toBool(); m_account_type.fromJson(js["account_type"].toObject()); } QString FullAccount::toString(bool multiline)const { QJsonObject js; toJson(js); QJsonDocument doc(js); QString s(doc.toJson(multiline ? QJsonDocument::Indented : QJsonDocument::Compact)); return s; } std::unique_ptr<FullAccount> FullAccount::factory::create(const QByteArray& data) { QJsonDocument doc = QJsonDocument::fromJson(data); QJsonObject js = doc.object(); return create(js); } std::unique_ptr<FullAccount> FullAccount::factory::create(const QJsonObject& js) { std::unique_ptr<FullAccount> rv; rv = std::unique_ptr<FullAccount>(new FullAccount); rv->fromJson(js); return rv; } }//users }//dropboxQt
# /usr/local/Library/Contributions/example-formula.rb # PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST! class RubyDmSqliteAdapter < Formula homepage "" head "git://git.kali.org/packages/<API key>.git" version "dm" # depends_on "cmake" => :build depends_on :x11 # if your formula requires any X11/XQuartz components def install # ENV.deparallelize # if your formula fails when building in parallel # Remove unrecognized options if warned by configure system "./configure", "--disable-debug", "--<API key>", "--<API key>", "--prefix=#{prefix}" # system "cmake", ".", *std_cmake_args system "make", "install" # if this fails, try separate make/make install steps end test do # `test do` will create, run in and delete a temporary directory. # This test will fail and we won't accept that! It's enough to just replace # "false" with the main program this formula installs, but it'd be nice if you # were more thorough. Run the test with `brew test <API key>`. Options passed # to `brew install` such as `--HEAD` also need to be provided to `brew test`. # The installed folder is not in the path, so use the entire path to any # executables being tested: `system "#{bin}/program", "do", "something"`. system "false" end end
#include "zjson.h" #define Start 0x1<<1 #define ObjectInitial 0x1<<2 #define MemberKey 0x1<<3 #define KeyValueDelimiter 0x1<<4 #define MemberValue 0x1<<5 #define MemberDelimiter 0x1<<6 #define ObjectFinish 0x1<<7 #define ArrayInitial 0x1<<8 #define Element 0x1<<9 #define ElementDelimiter 0x1<<10 #define ArrayFinish 0x1<<11 #define Finish 0x1<<12 /* * Log macro * What we can catch: * - JSON string * - current state * - current character * - current token start and end positions * - current line number and column number */ #define ERR(e) do{\ put_err_token(); \ printf("Unexpected char: '%c'\n" \ "\tstatus [%s] \n" \ "\tfunction %s:%d\n" \ "\ttoken position:(%d,%d)\n", \ *(e),StateStrings[_log2(state)-1],__FUNCTION__,__LINE__,line,column);\ exit(EXIT_FAILURE);\ }while(0) #define match(s, st) (s)&(st) #define SET_TOKEN_START(ptr) token_start = (ptr) #define SET_TOKEN_END(ptr) token_end = (ptr) #define PEEK(ptr) (*(ptr)) #define EAT(ptr) do{SET_TOKEN_START(ptr);(ptr)++;column++;}while(0); typedef int State; typedef struct stack { jval *head; struct stack *next; } stack; static inline int is_xdigit(jchar ch); static inline int is_digit(jchar ch); static inline int _log2(int n); static void put_err_token(void); static void put_context(void); static void stack_push(stack *st, jval *elem); static jval *stack_pop(stack *st); static jstr eat_key(const jchar **pp); static jval *eat_string(const jchar **); static jval *eat_num(const jchar **); static jval *eat_true(const jchar **); static jval *eat_false(const jchar **); static jval *eat_null(const jchar **); static const char *StateStrings[] = { "Start", "ObjectInitial", "MemberKey", "KeyValueDelimiter", "MemberValue", "MemberDelimiter", "ObjectFinish", "ArrayInitial", "Element", "ElementDelimiter", "ArrayFinish", "Finish" }; static const unsigned char firstByteMark[7] = {0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC}; static State state = Start; static int line = 1, column = 1; static const char *token_start = NULL, *token_end = NULL, *JSON = NULL; static inline int _log2(int n) { int e = 0; while (n >>= 1) e++; return e; } static void put_context(void) { const char *ptr = JSON; int count = 0; while (count < line) { ptr++; if (*ptr == '\n') count++; } } static void put_err_token(void) { printf("Error Token:\n\t"); const char *ptr = token_start, *ptr2 = token_start; while (ptr <= token_end) printf("%c", *ptr++); printf("\n\t"); while (ptr2++ < token_end) printf(" "); printf("^"); printf("\n\t"); } static void <API key>(const jchar **pp, jval *currentNode, jstr currentKey, jval *(*handle)(const jchar **)) { if (match(state, ArrayInitial | ElementDelimiter)) { state = Element; zJSON_set_arr_value(currentNode, handle(pp)); } else if (match(state, KeyValueDelimiter)) { state = MemberValue; zJSON_set_key_value(currentNode, currentKey, handle(pp)); } else ERR(*pp); } static void obj_arr_handler(const jchar **pp, vtype type, jval **pcurrentNode, stack *nodeStack, jchar *currentKey) { jval *newObjOrArray = zJSON_new_jval(type); if (match(state, Start)) { EAT(*pp); } else if (match(state, KeyValueDelimiter)) { zJSON_set_key_value(*pcurrentNode, currentKey, newObjOrArray); stack_push(nodeStack, *pcurrentNode); EAT(*pp); } else if (match(state, ArrayInitial | ElementDelimiter)) { zJSON_set_arr_value(*pcurrentNode, newObjOrArray); stack_push(nodeStack, *pcurrentNode); EAT(*pp); } else { ERR(*pp); } state = (type == OBJ) ? ObjectInitial : ArrayInitial; *pcurrentNode = newObjOrArray; } static jval *eat_literal(const jchar **pp, const char *str) { SET_TOKEN_START(*pp); const char *s = str; jval *v = NULL; while (*s) { if (**pp == *s) { (*pp)++; s++; } else { ERR(*pp); } } if (*str == 't') { v = zJSON_new_true(); } if (*str == 'f') { v = zJSON_new_false(); } if (*str == 'n') { v = zJSON_new_null(); } SET_TOKEN_END(*pp); return v; } inline jval *eat_true(const jchar **pp) { return eat_literal(pp, "true"); } inline jval *eat_false(const jchar **pp) { return eat_literal(pp, "false"); } inline jval *eat_null(const jchar **pp) { return eat_literal(pp, "null"); } #define __PREV(pp) (*(*pp-1)) #define __NEXT(pp) (*(*pp+1)) static unsigned parse_hex4(const char *str) { unsigned hex = 0; for (int i = 0; i < 4; ++i) { unsigned hc = 0; int ex = 0x1000 >> (i * 4); if ('0' <= str[i] && str[i] <= '9') { hc = 00 + str[i] - '0'; } else if ('A' <= str[i] && str[i] <= 'Z') { hc = 10 + str[i] - 'A'; } else if ('a' <= str[i] && str[i] <= 'z') { hc = 10 + str[i] - 'a'; } else return -1; hex += hc * ex; } return hex; } jstr eat_key(const jchar **pp) { SET_TOKEN_START(*pp); (*pp)++;/* skip the first '"'*/ const jchar *start_pos = *pp,*end_pos; size_t len = 0,unicode_len; unsigned uc,uc2; while (*pp && !(**pp == '\"' && __PREV(pp) != '\\') && ++len){ if (*((*pp)++) == '\\') (*pp)++; } /* Skip every escaped character, calculate the lenghth, Each unicode char occupies 5 bytes */ jstr str = malloc(len + 1); /* free() at free_jpair() */ end_pos = *pp; *pp = start_pos; char * ptr = str; while (*pp <= end_pos && !(**pp == '\"' && __PREV(pp) != '\\')){ if (**pp != '\\') { *ptr++ = *((*pp)++); } else { switch (__NEXT(pp)) { case 'b': *ptr++ = '\b'; (*pp) += 2; break; case 'f': *ptr++ = '\f'; (*pp) += 2; break; case 'n': *ptr++ = '\n'; (*pp) += 2; break; case 'r': *ptr++ = '\r'; (*pp) += 2; break; case 't': *ptr++ = '\t'; (*pp) += 2; break; case '"': *ptr++ = '"'; (*pp) += 2; break; case '/': *ptr++ = '/'; (*pp) += 2; break; case '\\':*ptr++ = '\\'; (*pp) += 2; break; case 'u': uc = parse_hex4((*pp)+2); (*pp) += 6;/* Why ? */ if ((uc >= 0xDC00 && uc <= 0xDFFF) || uc == 0) { ERR((*pp)); } /* invalid unicode number */ if (uc >= 0xD800 && uc <= 0xDBFF) { uc2 = parse_hex4((*pp)+2); (*pp) += 6; if ((uc2 >= 0xDC00 && uc2 <= 0xDFFF) || uc2 == 0) { ERR((*pp)); } uc = 0x10000 + (((uc & 0x3FF) << 10) | (uc2 & 0x3FF)); } unicode_len = 4; if (uc < 0x80) unicode_len = 1; else if (uc < 0x800) unicode_len = 2; else if (uc < 0x10000) unicode_len = 3; ptr += unicode_len; switch (unicode_len) { case 4: *--ptr = ((uc | 0x80) & 0xBF); uc >>= 6; case 3: *--ptr = ((uc | 0x80) & 0xBF); uc >>= 6; case 2: *--ptr = ((uc | 0x80) & 0xBF); uc >>= 6; case 1: *--ptr = ( uc | firstByteMark[unicode_len]); } ptr += unicode_len; break; default: ERR(*pp); } } } str[len] = 0; (*pp)++;/*skip the last '"'*/ column += len; SET_TOKEN_END(*pp); return str; } jval *eat_string(const jchar **pp) { strv->vstr = eat_key(pp); return strv; } static inline int is_digit(jchar ch) { return ((ch >= '0') && (ch <= '9')) || (ch == '.'); } static inline int is_xdigit(jchar ch) { return ((ch >= '0') && (ch <= '9')) || ((ch >= 'A') && (ch <= 'F')) || ((ch >= 'a') && (ch <= 'f')); } jval *eat_num(const jchar **pp) { //TODO SET_TOKEN_START(*pp); jchar buffer[41] = {0}; jchar *ptr = buffer; int dbl_flag = 0; if (**pp == '-') *(ptr++) = *((*pp)++); if (**pp != '.') { while (is_digit(**pp)) { *(ptr++) = *((*pp)++); } } else { ERR(*pp); } ptr = buffer; while (*ptr) if(*ptr++ == '.')dbl_flag = 1; jval *intv = zJSON_new_jval(dbl_flag?DBL:NUM); intv->vdouble = atof(buffer); SET_TOKEN_END(*pp); return intv; } void stack_push(stack *st, jval *head) { stack *e = malloc(sizeof(stack)); /* free at stack_pop() */ assert(e); e->head = head; e->next = st->next; st->next = e; } jval *stack_pop(stack *st) { if (st->next == NULL) return NULL; jval *head = st->next->head; stack *e = st->next; st->next = e->next; free(e);//crash here invalid next size FIXME! return head; } jval *zJSON_parse(const jchar *json) { JSON = json; const jchar *p = json; token_start = json; token_end = token_start; jval *currentNode = NULL; jchar *currentKey = NULL; stack *nodeStack = malloc(sizeof(stack)); /* free() at this function's end */ nodeStack->head = NULL; nodeStack->next = NULL; while (1) { switch (PEEK(p)) { case '{': case '[': obj_arr_handler(&p,(*p == '{')?OBJ:ARR,&currentNode,nodeStack,currentKey); break; case '"': if (match(state, ObjectInitial | MemberDelimiter)) { state = MemberKey; zJSON_set_key(currentNode, currentKey = eat_key(&p)); } else <API key>(&p, currentNode, currentKey, eat_string); break; case 't': <API key>(&p, currentNode, currentKey, eat_true); break; case 'f': <API key>(&p, currentNode, currentKey, eat_false); break; case 'n': <API key>(&p, currentNode, currentKey, eat_null); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case '-': <API key>(&p, currentNode, currentKey, eat_num); break; case '}': case ']': if (match(state, ObjectInitial | MemberValue | ArrayInitial | Element)) { jval *t_currentNode; if ((t_currentNode = stack_pop(nodeStack))) { currentNode = t_currentNode; state = (currentNode->type == ARR) ? Element : MemberValue; EAT(p); } else { EAT(p); goto AUTOMATA_END; } } else ERR(p); break; case ',': if (match(state, MemberValue)) { state = MemberDelimiter; EAT(p); } else if (match(state, Element)) { state = ElementDelimiter; EAT(p); } else ERR(p); break; case ':': if (match(state, MemberKey)) { state = KeyValueDelimiter; EAT(p); } else ERR(p); break; case '\n': line++; column = 1; /*NO break here*/ case '\t': case ' ': EAT(p); break; case '\0': if (match(state, ArrayFinish | ObjectFinish)) state = Finish; else ERR(p); goto AUTOMATA_END; default: ERR(p); } } AUTOMATA_END: free(nodeStack); state = Start; return currentNode; }
# Define helper methods to create test data # for mail view module MailViewTestData def admin_email @admin_email ||= FactoryGirl.build(:email, address: "admin@marketplace.com") end def admin @admin ||= FactoryGirl.build(:person, emails: [admin_email]) end def author @author ||= FactoryGirl.build(:person) end def starter @starter ||= FactoryGirl.build(:person) end def member return @member unless @member.nil? @member ||= FactoryGirl.build(:person) @member.emails.first.confirmation_token = "123456abcdef" @member end def <API key> @<API key> ||= [ FactoryGirl.build(:<API key>, person: admin, admin: true), FactoryGirl.build(:<API key>, person: author), FactoryGirl.build(:<API key>, person: starter), FactoryGirl.build(:<API key>, person: member) ] end def members @members ||= [admin, author, starter, member] end def payment_gateway @<API key> ||= FactoryGirl.build(:<API key>) end def <API key> @<API key> ||= FactoryGirl.build(:<API key>) end def payment return @payment unless @payment.nil? @payment ||= FactoryGirl.build(:braintree_payment, id: 55, payment_gateway: payment_gateway, payer: starter, recipient: author ) # Avoid infinite loop, set conversation here @payment.transaction = transaction @payment end def checkout_payment return @checkout_payment unless @checkout_payment.nil? @checkout_payment ||= FactoryGirl.build(:checkout_payment, id: 55, payment_gateway: <API key>, payer: starter, recipient: author ) # Avoid infinite loop, set conversation here @checkout_payment.conversation = conversation @checkout_payment end def listing @listing ||= FactoryGirl.build(:listing, author: author, id: 123 ) end def participations @participations ||= [ FactoryGirl.build(:participation, person: author), FactoryGirl.build(:participation, person: starter, is_starter: true) ] end def transaction @transaction ||= FactoryGirl.build(:transaction, id: 99, community: community, listing: listing, payment: payment, conversation: conversation, <API key>: 5 ) end def paypal_transaction @paypal_transaction ||= FactoryGirl.build(:transaction, id: 100, community: paypal_community, listing: listing, conversation: conversation, payment_gateway: :paypal, current_state: :paid, <API key>: 100 ) end def paypal_community @paypal_community ||= FactoryGirl.build(:community, custom_color1: "00FF99", id: 999 ) end def conversation @conversation ||= FactoryGirl.build(:conversation, id: 99, community: community, listing: listing, participations: participations, participants: [author, starter], messages: [message] ) end def message @message ||= FactoryGirl.build(:message, sender: starter, id: 123 ) end def community @community ||= FactoryGirl.build(:community, payment_gateway: payment_gateway, custom_color1: "FF0099", admins: [admin], members: members, <API key>: <API key> ) end def checkout_community @checkout_community ||= FactoryGirl.build(:community, payment_gateway: <API key>, custom_color1: "FF0099", admins: [admin], members: members, <API key>: <API key> ) end end
package br.com.vepo.datatransform.model; import org.springframework.beans.factory.annotation.Autowired; public abstract class Repository<T> { @Autowired protected MongoConnection mongoConnection; public <V> T find(Class<T> clazz, V key) { return mongoConnection.getMorphiaDataStore().get(clazz, key); } public void persist(T obj) { mongoConnection.getMorphiaDataStore().save(obj); } }
--Copyright (C) 2009 <SWGEmu> --This File is part of Core3. --This program is free software; you can redistribute --it and/or modify it under the terms of the GNU Lesser --General Public License as published by the Free Software --Foundation; either version 2 of the License, --or (at your option) any later version. --This program is distributed in the hope that it will be useful, --but WITHOUT ANY WARRANTY; without even the implied warranty of --MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --See the GNU Lesser General Public License for --more details. --You should have received a copy of the GNU Lesser General --Public License along with this program; if not, write to --the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --Linking Engine3 statically or dynamically with other modules --is making a combined work based on Engine3. --Thus, the terms and conditions of the GNU Lesser General Public License --cover the whole combination. --In addition, as a special exception, the copyright holders of Engine3 --give you permission to combine Engine3 program with free software --programs or libraries that are released under the GNU LGPL and with --code included in the standard release of Core3 under the GNU LGPL --license (or modified versions of such code, with unchanged license). --You may copy and distribute such a system following the terms of the --GNU LGPL for Engine3 and the licenses of the other code concerned, --provided that you include the source code of that other code when --and as the GNU LGPL requires distribution of source code. --Note that people who make modified versions of Engine3 are not obligated --to grant this special exception for their modified versions; --it is their choice whether to do so. The GNU Lesser General Public License --gives permission to release a modified version without this exception; --this exception also makes it possible to release a modified version --which carries forward this exception. <API key> = <API key>:new { appearanceFilename = "", <API key> = "abstract/slot/arrangement/wearables/hold_r.iff", attackType = 1, <API key> = {}, clearFloraRadius = 0, clientDataFile = "clientdata/weapon/<API key>.cdf", <API key> = 0, <API key> = 51, <API key> = 1, <API key> = 0, <API key> = 1, <API key> = 0, containerType = 1, <API key> = 0, <API key> = {}, detailedDescription = "string_id_table", gameObjectType = 131080, <API key> = 0, lookAtText = "string_id_table", noBuildRadius = 0, objectName = "@obj_n:unknown_weapon", onlyVisibleInTools = 0, <API key> = {}, <API key> = "", <API key> = {}, scale = 1, <API key> = 0.5, sendToClient = 1, <API key> = "abstract/slot/descriptor/default_weapon.iff", snapToTerrain = 1, socketDestinations = {}, <API key> = "", surfaceType = 0, targetable = 1, <API key> = 0, weaponEffect = "bolt", weaponEffectIndex = 0 } ObjectTemplates:addTemplate(<API key>, 3231039364) <API key> = <API key>:new { appearanceFilename = "", <API key> = "abstract/slot/arrangement/wearables/hold_both.iff", attackType = 1, <API key> = {}, clearFloraRadius = 0, clientDataFile = "clientdata/weapon/<API key>.cdf", <API key> = 0, <API key> = 51, <API key> = 1, <API key> = 0, <API key> = 1, <API key> = 0, containerType = 1, <API key> = 0, <API key> = {}, detailedDescription = "string_id_table", gameObjectType = 131080, <API key> = 0, lookAtText = "string_id_table", noBuildRadius = 0, objectName = "@obj_n:unknown_weapon", onlyVisibleInTools = 0, <API key> = {}, <API key> = "", <API key> = {}, scale = 1, <API key> = 0.5, sendToClient = 1, <API key> = "abstract/slot/descriptor/default_lightsaber.iff", snapToTerrain = 1, socketDestinations = {}, <API key> = "", surfaceType = 0, targetable = 1, <API key> = 0, weaponEffect = "bolt", weaponEffectIndex = 0 } ObjectTemplates:addTemplate(<API key>, 3974479430)
package charmrepo_test import ( jc "github.com/juju/testing/checkers" gc "gopkg.in/check.v1" "gopkg.in/juju/charm.v6-unstable" "gopkg.in/juju/charmrepo.v0" "gopkg.in/juju/charmrepo.v0/csclient" charmtesting "gopkg.in/juju/charmrepo.v0/testing" ) var TestCharms = charmtesting.NewRepo("internal/test-charm-repo", "quantal") type inferRepoSuite struct{} var _ = gc.Suite(&inferRepoSuite{}) var <API key> = []struct { url string localRepoPath string err string }{{ url: "cs:trusty/django", }, { url: "local:precise/wordpress", err: "path to local repository not specified", }, { url: "local:precise/haproxy-47", localRepoPath: "/tmp/repo-path", }} func (s *inferRepoSuite) TestInferRepository(c *gc.C) { for i, test := range <API key> { c.Logf("test %d: %s", i, test.url) ref := charm.MustParseReference(test.url) repo, err := charmrepo.InferRepository( ref, charmrepo.NewCharmStoreParams{}, test.localRepoPath) if test.err != "" { c.Assert(err, gc.ErrorMatches, test.err) c.Assert(repo, gc.IsNil) continue } c.Assert(err, jc.ErrorIsNil) switch store := repo.(type) { case *charmrepo.LocalRepository: c.Assert(store.Path, gc.Equals, test.localRepoPath) case *charmrepo.CharmStore: c.Assert(store.URL(), gc.Equals, csclient.ServerURL) default: c.Fatal("unknown repository type") } } }
<?php namespace Clearbooks\Labs\Toggle\Entity; class Parasol extends ToggleStub { protected $name = "Parasol"; protected $desc = "An MASsIVE Umbrella"; protected $id = 2; protected $toggleTitle = "Parasols 4 Dayz"; }
ALTER TABLE [dbo].[<API key>] WITH CHECK ADD CONSTRAINT [<API key>] FOREIGN KEY([StockNo]) REFERENCES [dbo].[Stock] ([StockNo]) GO ALTER TABLE [dbo].[<API key>] CHECK CONSTRAINT [<API key>] GO
package com.silicolife.textmining.processes.ie.ner.nerlexicalresources; import java.util.ArrayList; import java.util.Calendar; import java.util.Collection; import java.util.Date; import java.util.Iterator; import java.util.List; import java.util.Properties; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import com.fasterxml.jackson.annotation.JsonIgnore; import com.silicolife.textmining.core.datastructures.documents.<API key>; import com.silicolife.textmining.core.datastructures.exceptions.process.<API key>; import com.silicolife.textmining.core.datastructures.init.InitConfiguration; import com.silicolife.textmining.core.datastructures.process.ProcessOriginImpl; import com.silicolife.textmining.core.datastructures.report.processes.<API key>; import com.silicolife.textmining.core.datastructures.utils.GenerateRandomId; import com.silicolife.textmining.core.datastructures.utils.Utils; import com.silicolife.textmining.core.datastructures.utils.conf.GlobalOptions; import com.silicolife.textmining.core.datastructures.utils.conf.OtherConfigurations; import com.silicolife.textmining.core.datastructures.utils.multithearding.IParallelJob; import com.silicolife.textmining.core.interfaces.core.dataaccess.exception.ANoteException; import com.silicolife.textmining.core.interfaces.core.document.IAnnotatedDocument; import com.silicolife.textmining.core.interfaces.core.document.IPublication; import com.silicolife.textmining.core.interfaces.core.document.corpus.ICorpus; import com.silicolife.textmining.core.interfaces.core.report.processes.INERProcessReport; import com.silicolife.textmining.core.interfaces.process.IProcessOrigin; import com.silicolife.textmining.core.interfaces.process.IE.IIEProcess; import com.silicolife.textmining.core.interfaces.process.IE.INERProcess; import com.silicolife.textmining.core.interfaces.process.IE.ner.INERConfiguration; import com.silicolife.textmining.processes.ie.ner.nerlexicalresources.configuration.<API key>; import com.silicolife.textmining.processes.ie.ner.nerlexicalresources.configuration.<API key>; import com.silicolife.textmining.processes.ie.ner.nerlexicalresources.configuration.<API key>; import com.silicolife.textmining.processes.ie.ner.nerlexicalresources.multithreading.NERParallelStep; import com.silicolife.textmining.processes.ie.ner.nerlexicalresources.preprocessingmodel.<API key>; public class NERLexicalResources implements INERProcess{ public static String <API key> = "NER Lexical Resources Tagger"; public static final IProcessOrigin <API key>= new ProcessOriginImpl(GenerateRandomId.generateID(),<API key>); private boolean stop = false; private ExecutorService executor; public NERLexicalResources() { } public INERProcessReport executeCorpusNER(INERConfiguration configuration) throws ANoteException, <API key> { <API key>(configuration); <API key> <API key> = (<API key>) configuration; <API key> preprocessing = <API key>.<API key>(); <API key> model = <API key>.build(<API key>,preprocessing); IIEProcess processToRun = getIEProcess(<API key>,model); // creates the thread executor that in each thread executes the ner for a document executor = Executors.newFixedThreadPool(OtherConfigurations.getThreadsNumber()); InitConfiguration.getDataAccess().createIEProcess(processToRun); InitConfiguration.getDataAccess().<API key>(configuration.getCorpus(), processToRun); <API key> report = new <API key>(<API key>,processToRun); stop = false; if(!stop) { <API key>(report,<API key>,processToRun,model); } else { report.setFinishing(false); } return report; } private IIEProcess getIEProcess(<API key> <API key>,<API key> model) { String description = NERLexicalResources.<API key> + " " +Utils.SimpleDataFormat.format(new Date()); Properties properties = model.getProperties(<API key>); IIEProcess processToRun = <API key>.getIEProcess(); processToRun.setName(description); processToRun.setProperties(properties); if(processToRun.getCorpus() == null) processToRun.setCorpus(<API key>.getCorpus()); return processToRun; } private void <API key>(<API key> report,<API key> configuration,IIEProcess process,<API key> model) throws ANoteException { int size = process.getCorpus().getCorpusStatistics().getDocumentNumber(); long startTime = Calendar.getInstance().getTimeInMillis(); long actualTime,differTime; int i=0; Collection<IPublication> docs = process.getCorpus().getArticlesCorpus().getAllDocuments().values(); List<IParallelJob<Integer>> jobs = new ArrayList<>(); for(IPublication pub:docs) { if(!stop) { List<Long> <API key> = new ArrayList<Long>(); IAnnotatedDocument annotDoc = new <API key>(pub,process, process.getCorpus()); String text = annotDoc.<API key>(); if(text==null) { // Logger logger = Logger.getLogger(Workbench.class.getName()); // logger.warn("The article whit id: "+pub.getId()+"not contains abstract "); System.err.println("The article whit id: "+pub.getId()+"not contains abstract "); } else { jobs.add(executeNER(process.getCorpus(), executor,<API key>, annotDoc, text,configuration,model,process)); } report.incrementDocument(); } else { report.setFinishing(false); break; } } startTime = Calendar.getInstance().getTimeInMillis(); executor.shutdown(); // loop to give the progress bar of jobs while(!jobs.isEmpty() && !stop){ actualTime = Calendar.getInstance().getTimeInMillis(); differTime = actualTime - startTime; Iterator<IParallelJob<Integer>> itjobs = jobs.iterator(); while(itjobs.hasNext() && !stop){ IParallelJob<Integer> job = itjobs.next(); if(job.isFinished()){ report.<API key>(job.getResultJob()); itjobs.remove(); } } if(differTime > 10000 * i) { int step = size-jobs.size(); <API key>(step, size, startTime); i++; } } //in case of stop, that will kill the running jobs if(stop){ for(IParallelJob<Integer> job : jobs) job.kill(); } try { executor.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS); } catch (<API key> e) { throw new ANoteException(e); } actualTime = Calendar.getInstance().getTimeInMillis(); report.setTime(<API key>); } @JsonIgnore protected void memoryAndProgress(int step, int total) { System.out.println((GlobalOptions.decimalformat.format((double) step / (double) total * 100)) + " %..."); // System.gc(); // System.out.println((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / (1024 * 1024) + " MB "); } @JsonIgnore protected void <API key>(int step, int total, long startTime) { System.out.println((GlobalOptions.decimalformat.format((double) step / (double) total * 100)) + " %..."); // System.gc(); // System.out.println((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / (1024 * 1024) + " MB "); } private IParallelJob<Integer> executeNER(ICorpus corpus,ExecutorService executor,List<Long> <API key>,IAnnotatedDocument annotDoc,String text,<API key> confguration,<API key> <API key>,IIEProcess process) { IParallelJob<Integer> job = new NERParallelStep(<API key>,annotDoc, process, corpus, text, <API key>,confguration.getCaseSensitive(),confguration.isNormalized()); executor.submit(job); return job; } public void stop() { stop = true; //removes the jobs from executor and attempts to interrput the threads executor.shutdownNow(); } @Override public void <API key>(INERConfiguration configuration)throws <API key> { if(configuration instanceof <API key>) { <API key> <API key> = (<API key>) configuration; if(<API key>.getCorpus()==null) { throw new <API key>("Corpus can not be null"); } } else throw new <API key>("configuration must be <API key> isntance"); } }
!function(a,b,c,d){"use strict";function e(a,b){function c(a){function c(a,c){function e(a){var c="T";return h.dom=h.dom?h.dom:b.dom,-1===h.dom.indexOf(c)&&(h.dom=c+h.dom),h.hasTableTools=!0,d.isString(a)&&h.<API key>("sSwfPath",a),h}function f(a,b){return d.isString(a)&&(h.oTableTools=h.oTableTools&&null!==h.oTableTools?h.oTableTools:{},h.oTableTools[a]=b),h}function g(a){return d.isArray(a)&&h.<API key>("aButtons",a),h}var h=a(c);return h.withTableTools=e,h.<API key>=f,h.<API key>=g,h}var e=a.newOptions,f=a.fromSource,g=a.fromFnPromise;return a.newOptions=function(){return c(e)},a.fromSource=function(a){return c(f,a)},a.fromFnPromise=function(a){return c(g,a)},a}a.decorator("DTOptionsBuilder",c),c.$inject=["$delegate"]}d.module("datatables.tabletools",["datatables"]).config(e),e.$inject=["$provide","DT_DEFAULT_OPTIONS"]}(window,document,jQuery,angular);
# This file is part of pycangjie, the Python bindings to libcangjie. # pycangjie is free software: you can redistribute it and/or modify # (at your option) any later version. # pycangjie is distributed in the hope that it will be useful, # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the import itertools import operator import string import subprocess import unittest import cangjie class MetaTest(type): """Metaclass for our test cases The goal is to provide every TestCase class with methods like test_a(), test_b(), etc..., in other words, one method per potential Cangjie input code. Well, not quite, because that would be 12356630 methods (the number of strings composed of 1 to 5 lowercase ascii letters), and even though my laptop has 8Go of RAM, the test process gets killed by the OOM killer. :) So we cheat, and use libcangjie's wildcard support, so that we only generate 26 + 26^2 = 702 methods. """ def __init__(cls, name, bases, dct): super(MetaTest, cls).__init__(name, bases, dct) def gen_codes(): """Generate the 702 possible input codes""" # First, the 1-character codes for c in string.ascii_lowercase: yield c # Next, the <API key> codes for t in itertools.product(string.ascii_lowercase, repeat=2): yield '*'.join(t) def tester(code): def func(cls): return cls.run_test(code) return func # Generate the test_* methods for code in gen_codes(): setattr(cls, "test_%s" % code.replace("*", ""), tester(code)) class BaseTestCase(unittest.TestCase): """Base test class, grouping the common stuff for all our unit tests""" def __init__(self, name): super().__init__(name) self.cli_cmd = ["/usr/bin/libcangjie_cli"] + self.cli_options self.language = (cangjie.filters.BIG5 | cangjie.filters.HKSCS | cangjie.filters.PUNCTUATION | cangjie.filters.CHINESE | cangjie.filters.ZHUYIN | cangjie.filters.KANJI | cangjie.filters.KATAKANA | cangjie.filters.HIRAGANA | cangjie.filters.SYMBOLS) def setUp(self): self.cj = cangjie.Cangjie(self.version, self.language) def tearDown(self): del self.cj def run_command(self, cmd): """Run a command, deal with errors, and return its stdout""" proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = proc.communicate() try: cangjie.errors.handle_error_code(proc.returncode, msg="Unknown error while running" " libcangjie_cli (%d)" % proc.returncode) except cangjie.errors.CangjieNoCharsError: return "" try: return out.decode("utf-8") except UnicodeDecodeError: # Python's 'utf-8' codec trips over b"\xed\xa1\x9d\xed\xbc\xb2", # but according to [1] and [2], it is a valid sequence of 2 chars: # U+D85D \xed\xa1\x9d # U+DF32 \xed\xbc\xb2 # TODO: Investigate this further, and eventually open a bug report out2 = [] for line in out.split("\n".encode("utf-8")): try: out2.append(line.decode("utf-8")) except UnicodeDecodeError: pass return "\n".join(out2) def run_test(self, input_code): """Run the actual test This compares the output of the libcangjie_cli tool with the output from pycangjie. The idea is that if pycangjie produces the same results as a C++ tool compiled against libcangjie, then pycangjie properly wraps libcangjie. We do not try to verify that pycangjie produces valid results here, validity is to be checked in libcangjie. Note that this whole test is based on scraping the output of libcangjie_cli, which is quite fragile. """ # Get a list of CangjieChar from libcangjie_cli as a reference tmp_expected = self.run_command(self.cli_cmd+[input_code]).split("\n") tmp_expected = map(lambda x: x.strip(" \n"), tmp_expected) tmp_expected = filter(lambda x: len(x) > 0, tmp_expected) expected = [] for item in tmp_expected: chchar, simpchar, code, frequency = item.split(", ") chchar = chchar.split(": ")[-1].strip("'") simpchar = simpchar.split(": ")[-1].strip("'") code = code.split(": ")[-1].strip("'") frequency = int(frequency.split(" ")[-1]) expected.append(cangjie._core.CangjieChar(chchar.encode("utf-8"), simpchar.encode("utf-8"), code.encode("utf-8"), frequency)) expected = sorted(expected, key=operator.attrgetter('chchar', 'code')) try: # And compare with what pycangjie produces results = sorted(self.cj.get_characters(input_code), key=operator.attrgetter('chchar', 'code')) self.assertEqual(results, expected) except cangjie.errors.CangjieNoCharsError: self.assertEqual(len(expected), 0)
/*#include "StdAfx.h"*/ #include "Sqlite3Ex.h" #include <string.h> Sqlite3Ex::Sqlite3Ex(void) :m_pSqlite(NULL) { memset(m_szErrMsg, 0x00, ERRMSG_LENGTH); } Sqlite3Ex::~Sqlite3Ex(void) { } bool Sqlite3Ex::Open(const wchar_t* szDbPath) { int nRet = sqlite3_open16(szDbPath, &m_pSqlite); if (SQLITE_OK != nRet) { SetErrMsg(sqlite3_errmsg(m_pSqlite)); return false; } return true; } bool Sqlite3Ex::Close() { bool bRet = false; if (SQLITE_OK == sqlite3_close(m_pSqlite)) { bRet = true; m_pSqlite = NULL; } return bRet; } bool Sqlite3Ex::CreateTable(const char* szTableName, int nColNum, <API key> emColAttrib, ...) { if (NULL == szTableName || 0 == strlen(szTableName) || 0 >= nColNum) { SetErrMsg("Parameter is invalid."); return false; } std::string strSql("CREATE TABLE "); strSql += szTableName; strSql += "("; va_list ap; va_start(ap, nColNum); char szTmp[<API key>]; for (int i = 0; i != nColNum; ++i) { ::memset(szTmp, 0x00, <API key>); <API key> & ta = va_arg(ap, <API key>); ta.GetStringForSQL(szTmp); strSql += szTmp; strSql += ","; } va_end(ap); *(strSql.end() - 1) = ')'; return <API key>(strSql.c_str()); } bool Sqlite3Ex::BegTransAction() { return <API key>("BEGIN TRANSACTION"); } bool Sqlite3Ex::EndTransAction() { return <API key>("END TRANSACTION"); } bool Sqlite3Ex::Sqlite3Ex_Exec(const char* szQuery, LPEXEC_CALLBACK callback, void* pFirstParam) { char* szErrMsg = NULL; int nRet = sqlite3_exec(m_pSqlite, szQuery, callback, pFirstParam, &szErrMsg); if (SQLITE_OK != nRet) { SetErrMsg(szErrMsg); sqlite3_free(szErrMsg); return false; } return true; } bool Sqlite3Ex::GetTableNames(std::vector<std::string> & vecTableNames) { char* szErrMsg = NULL; char** pRetData = NULL; int nRow, nCol; int nRet = sqlite3_get_table(m_pSqlite, "SELECT name FROM sqlite_master WHERE type='table'", &pRetData, &nRow, &nCol, &szErrMsg); if (SQLITE_OK != nRet) { SetErrMsg(szErrMsg); sqlite3_free(szErrMsg); return false; } vecTableNames.resize(nRow); for (int i = 1; i <= nRow; ++i) vecTableNames[i - 1] = pRetData[i]; sqlite3_free_table(pRetData); return true; } int Sqlite3Ex::<API key>(void* pFirstParam, int iColNum, char** pRecordArr, char** pColNameArr) { if (iColNum <= 0) return 0; Sqlite3Ex_Reader* pReader = (Sqlite3Ex_Reader*)pFirstParam; if (NULL == pReader) return 0; std::vector<std::string>* pVecLine = new std::vector<std::string>; pVecLine->resize(iColNum); for (int i = 0; i != iColNum; ++i) (*pVecLine)[i] = pRecordArr[i]; pReader->m_vecResult.push_back(pVecLine); return 0; } bool Sqlite3Ex::<API key>(const char* szQuery, Sqlite3Ex_Reader* pReader) { char* szErrMsg = NULL; if (SQLITE_OK == sqlite3_exec(m_pSqlite, szQuery, <API key>, (void*)pReader, &szErrMsg)) return true; SetErrMsg(szErrMsg); sqlite3_free(szErrMsg); return false; } bool Sqlite3Ex::<API key>(const char* szQuery) { char* szErrMsg = NULL; if (SQLITE_OK == sqlite3_exec(m_pSqlite, szQuery, NULL, NULL, &szErrMsg)) return true; SetErrMsg(szErrMsg); sqlite3_free(szErrMsg); return false; } bool Sqlite3Ex::IsOpen() { if (!m_pSqlite) return false; return true; }
<?php namespace Aimeos\Admin\JQAdm\Type\Media\Property; class StandardTest extends \PHPUnit\Framework\TestCase { private $context; private $object; private $view; protected function setUp() : void { $this->view = \TestHelper::view(); $this->context = \TestHelper::context(); $this->object = new \Aimeos\Admin\JQAdm\Type\Media\Property\Standard( $this->context ); $this->object = new \Aimeos\Admin\JQAdm\Common\Decorator\Page( $this->object, $this->context ); $this->object->setAimeos( \TestHelper::getAimeos() ); $this->object->setView( $this->view ); } protected function tearDown() : void { unset( $this->object, $this->view, $this->context ); } public function testCreate() { $result = $this->object->create(); $this-><API key>( 'media/property', $result ); $this->assertEmpty( $this->view->get( 'errors' ) ); } public function testCreateException() { $object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Type\Media\Property\Standard::class ) ->setConstructorArgs( array( $this->context, \TestHelper::getTemplatePaths() ) ) ->setMethods( array( 'getSubClients' ) ) ->getMock(); $object->expects( $this->once() )->method( 'getSubClients' ) ->will( $this->throwException( new \RuntimeException() ) ); $object->setView( $this->getViewNoRender() ); $object->create(); } public function testCopy() { $manager = \Aimeos\MShop::create( $this->context, 'media/property/type' ); $param = ['type' => 'unittest', 'id' => $manager->find( 'size', [], 'media' )->getId()]; $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param ); $this->view->addHelper( 'param', $helper ); $result = $this->object->copy(); $this-><API key>( 'size', $result ); } public function testCopyException() { $object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Type\Media\Property\Standard::class ) ->setConstructorArgs( array( $this->context, \TestHelper::getTemplatePaths() ) ) ->setMethods( array( 'getSubClients' ) ) ->getMock(); $object->expects( $this->once() )->method( 'getSubClients' ) ->will( $this->throwException( new \RuntimeException() ) ); $object->setView( $this->getViewNoRender() ); $object->copy(); } public function testDelete() { $this->assertNull( $this->getClientMock( ['redirect'], false )->delete() ); } public function testDeleteException() { $object = $this->getClientMock( ['getSubClients', 'search'] ); $object->expects( $this->once() )->method( 'getSubClients' ) ->will( $this->throwException( new \RuntimeException() ) ); $object->expects( $this->once() )->method( 'search' ); $object->delete(); } public function testGet() { $manager = \Aimeos\MShop::create( $this->context, 'media/property/type' ); $param = ['type' => 'unittest', 'id' => $manager->find( 'size', [], 'media' )->getId()]; $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param ); $this->view->addHelper( 'param', $helper ); $result = $this->object->get(); $this-><API key>( 'size', $result ); } public function testGetException() { $object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Type\Media\Property\Standard::class ) ->setConstructorArgs( array( $this->context, \TestHelper::getTemplatePaths() ) ) ->setMethods( array( 'getSubClients' ) ) ->getMock(); $object->expects( $this->once() )->method( 'getSubClients' ) ->will( $this->throwException( new \RuntimeException() ) ); $object->setView( $this->getViewNoRender() ); $object->get(); } public function testSave() { $manager = \Aimeos\MShop::create( $this->context, 'media/property/type' ); $param = array( 'type' => 'unittest', 'item' => array( 'media.property.type.id' => '', 'media.property.type.status' => '1', 'media.property.type.domain' => 'product', 'media.property.type.code' => 'jqadm@test', 'media.property.type.label' => 'jqadm test', ), ); $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param ); $this->view->addHelper( 'param', $helper ); $result = $this->object->save(); $manager->delete( $manager->find( 'jqadm@test', [], 'product' )->getId() ); $this->assertEmpty( $this->view->get( 'errors' ) ); $this->assertNull( $result ); } public function testSaveException() { $object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Type\Media\Property\Standard::class ) ->setConstructorArgs( array( $this->context, \TestHelper::getTemplatePaths() ) ) ->setMethods( array( 'fromArray' ) ) ->getMock(); $object->expects( $this->once() )->method( 'fromArray' ) ->will( $this->throwException( new \RuntimeException() ) ); $object->setView( $this->getViewNoRender() ); $object->save(); } public function testSearch() { $param = array( 'type' => 'unittest', 'locale' => 'de', 'filter' => array( 'key' => array( 0 => 'media.property.type.code' ), 'op' => array( 0 => '==' ), 'val' => array( 0 => 'size' ), ), 'sort' => array( '-media.property.type.id' ), ); $helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param ); $this->view->addHelper( 'param', $helper ); $result = $this->object->search(); $this-><API key>( '>size<', $result ); } public function testSearchException() { $object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Type\Media\Property\Standard::class ) ->setConstructorArgs( array( $this->context, \TestHelper::getTemplatePaths() ) ) ->setMethods( array( 'initCriteria' ) ) ->getMock(); $object->expects( $this->once() )->method( 'initCriteria' ) ->will( $this->throwException( new \RuntimeException() ) ); $object->setView( $this->getViewNoRender() ); $object->search(); } public function <API key>() { $this->expectException( \Aimeos\Admin\JQAdm\Exception::class ); $this->object->getSubClient( '$unknown$' ); } public function <API key>() { $this->expectException( \Aimeos\Admin\JQAdm\Exception::class ); $this->object->getSubClient( 'unknown' ); } public function getClientMock( $methods, $real = true ) { $object = $this->getMockBuilder( \Aimeos\Admin\JQAdm\Type\Media\Property\Standard::class ) ->setConstructorArgs( array( $this->context, \TestHelper::getTemplatePaths() ) ) ->setMethods( (array) $methods ) ->getMock(); $object->setAimeos( \TestHelper::getAimeos() ); $object->setView( $this->getViewNoRender( $real ) ); return $object; } protected function getViewNoRender( $real = true ) { $view = $this->getMockBuilder( \Aimeos\MW\View\Standard::class ) ->setConstructorArgs( array( [] ) ) ->setMethods( array( 'render' ) ) ->getMock(); $manager = \Aimeos\MShop::create( $this->context, 'media/property/type' ); $param = ['site' => 'unittest', 'id' => $real ? $manager->find( 'size', [], 'media' )->getId() : -1]; $helper = new \Aimeos\MW\View\Helper\Param\Standard( $view, $param ); $view->addHelper( 'param', $helper ); $helper = new \Aimeos\MW\View\Helper\Config\Standard( $view, $this->context->config() ); $view->addHelper( 'config', $helper ); $helper = new \Aimeos\MW\View\Helper\Access\Standard( $view, [] ); $view->addHelper( 'access', $helper ); return $view; } }
# Makefile for building: animatedtiles.app/Contents/MacOS/animatedtiles # Generated by qmake (2.01a) (Qt 4.7.4) on: ? 4? 16 23:07:08 2015 # Project: animatedtiles.pro # Template: app # Command: /Users/ssangkong/NVRAM_KWU/<API key>.7.4/bin/qmake -spec ../../../mkspecs/macx-g++ -o Makefile animatedtiles.pro CC = gcc CXX = g++ DEFINES = -<API key> -D_LARGEFILE_SOURCE -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -DQT_HAVE_SSE4_1 -DQT_HAVE_SSE4_2 -DQT_HAVE_AVX -DQT_SHARED CFLAGS = -pipe -Xarch_x86_64 -mmacosx-version-min=10.5 -g -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W $(DEFINES) CXXFLAGS = -pipe -Xarch_x86_64 -mmacosx-version-min=10.5 -g -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W $(DEFINES) INCPATH = -I../../../mkspecs/macx-g++ -I. -I../../../include/QtCore -I../../../include/QtGui -I../../../include -I.moc/debug-shared -F/Users/ssangkong/NVRAM_KWU/<API key>.7.4/lib LINK = g++ LFLAGS = -<API key> -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Xarch_x86_64 -mmacosx-version-min=10.5 LIBS = $(SUBLIBS) -F/Users/ssangkong/NVRAM_KWU/<API key>.7.4/lib -L/Users/ssangkong/NVRAM_KWU/<API key>.7.4/lib -framework QtGui -L/Users/ssangkong/NVRAM_KWU/<API key>.7.4/lib -F/Users/ssangkong/NVRAM_KWU/<API key>.7.4/lib -framework QtCore AR = ar cq RANLIB = ranlib -s QMAKE = /Users/ssangkong/NVRAM_KWU/<API key>.7.4/bin/qmake TAR = tar -cf COMPRESS = gzip -9f COPY = cp -f SED = sed COPY_FILE = cp -f COPY_DIR = cp -f -R STRIP = INSTALL_FILE = $(COPY_FILE) INSTALL_DIR = $(COPY_DIR) INSTALL_PROGRAM = $(COPY_FILE) DEL_FILE = rm -f SYMLINK = ln -f -s DEL_DIR = rmdir MOVE = mv -f CHK_DIR_EXISTS= test -d MKDIR = mkdir -p export <API key> = 10.5 OBJECTS_DIR = .obj/debug-shared/ SOURCES = main.cpp .rcc/debug-shared/qrc_animatedtiles.cpp OBJECTS = .obj/debug-shared/main.o \ .obj/debug-shared/qrc_animatedtiles.o DIST = ../../../mkspecs/common/unix.conf \ ../../../mkspecs/common/mac.conf \ ../../../mkspecs/common/mac-g++.conf \ ../../../mkspecs/features/exclusive_builds.prf \ ../../../mkspecs/features/default_pre.prf \ ../../../mkspecs/features/mac/default_pre.prf \ ../../../.qmake.cache \ ../../../mkspecs/qconfig.pri \ ../../../mkspecs/modules/qt_webkit_version.pri \ ../../../mkspecs/features/qt_functions.prf \ ../../../mkspecs/features/qt_config.prf \ ../../../mkspecs/features/debug.prf \ ../../../mkspecs/features/default_post.prf \ ../../../mkspecs/features/mac/default_post.prf \ ../../../mkspecs/features/mac/x86_64.prf \ ../../../mkspecs/features/mac/objective_c.prf \ ../../../mkspecs/features/unix/dylib.prf \ ../../../mkspecs/features/unix/largefile.prf \ ../../../mkspecs/features/dll.prf \ ../../../mkspecs/features/shared.prf \ ../../../mkspecs/features/warn_on.prf \ ../../../mkspecs/features/qt.prf \ ../../../mkspecs/features/unix/thread.prf \ ../../../mkspecs/features/moc.prf \ ../../../mkspecs/features/mac/rez.prf \ ../../../mkspecs/features/mac/sdk.prf \ ../../../mkspecs/features/resources.prf \ ../../../mkspecs/features/uic.prf \ ../../../mkspecs/features/yacc.prf \ ../../../mkspecs/features/lex.prf \ animatedtiles.pro QMAKE_TARGET = animatedtiles DESTDIR = TARGET = animatedtiles.app/Contents/MacOS/animatedtiles <API key> = -pipe \ -Xarch_x86_64 \ -mmacosx-version-min=10.5 \ -g \ -arch \ x86_64 \ -Xarch_x86_64 \ -mmacosx-version-min=10.5 \ -Wall \ -W first: all .SUFFIXES: .o .c .cpp .cc .cxx .C .cpp.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .cc.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .cxx.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .C.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .c.o: $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" all: Makefile animatedtiles.app/Contents/PkgInfo animatedtiles.app/Contents/Resources/empty.lproj animatedtiles.app/Contents/Info.plist $(TARGET) $(TARGET): $(OBJECTS) @$(CHK_DIR_EXISTS) animatedtiles.app/Contents/MacOS/ || $(MKDIR) animatedtiles.app/Contents/MacOS/ $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) Makefile: animatedtiles.pro ../../../.qmake.cache ../../../mkspecs/macx-g++/qmake.conf ../../../mkspecs/common/unix.conf \ ../../../mkspecs/common/mac.conf \ ../../../mkspecs/common/mac-g++.conf \ ../../../mkspecs/features/exclusive_builds.prf \ ../../../mkspecs/features/default_pre.prf \ ../../../mkspecs/features/mac/default_pre.prf \ ../../../.qmake.cache \ ../../../mkspecs/qconfig.pri \ ../../../mkspecs/modules/qt_webkit_version.pri \ ../../../mkspecs/features/qt_functions.prf \ ../../../mkspecs/features/qt_config.prf \ ../../../mkspecs/features/debug.prf \ ../../../mkspecs/features/default_post.prf \ ../../../mkspecs/features/mac/default_post.prf \ ../../../mkspecs/features/mac/x86_64.prf \ ../../../mkspecs/features/mac/objective_c.prf \ ../../../mkspecs/features/unix/dylib.prf \ ../../../mkspecs/features/unix/largefile.prf \ ../../../mkspecs/features/dll.prf \ ../../../mkspecs/features/shared.prf \ ../../../mkspecs/features/warn_on.prf \ ../../../mkspecs/features/qt.prf \ ../../../mkspecs/features/unix/thread.prf \ ../../../mkspecs/features/moc.prf \ ../../../mkspecs/features/mac/rez.prf \ ../../../mkspecs/features/mac/sdk.prf \ ../../../mkspecs/features/resources.prf \ ../../../mkspecs/features/uic.prf \ ../../../mkspecs/features/yacc.prf \ ../../../mkspecs/features/lex.prf \ /Users/ssangkong/NVRAM_KWU/<API key>.7.4/lib/QtGui.framework/QtGui.prl \ /Users/ssangkong/NVRAM_KWU/<API key>.7.4/lib/QtCore.framework/QtCore.prl $(QMAKE) -spec ../../../mkspecs/macx-g++ -o Makefile animatedtiles.pro ../../../mkspecs/common/unix.conf: ../../../mkspecs/common/mac.conf: ../../../mkspecs/common/mac-g++.conf: ../../../mkspecs/features/exclusive_builds.prf: ../../../mkspecs/features/default_pre.prf: ../../../mkspecs/features/mac/default_pre.prf: ../../../.qmake.cache: ../../../mkspecs/qconfig.pri: ../../../mkspecs/modules/qt_webkit_version.pri: ../../../mkspecs/features/qt_functions.prf: ../../../mkspecs/features/qt_config.prf: ../../../mkspecs/features/debug.prf: ../../../mkspecs/features/default_post.prf: ../../../mkspecs/features/mac/default_post.prf: ../../../mkspecs/features/mac/x86_64.prf: ../../../mkspecs/features/mac/objective_c.prf: ../../../mkspecs/features/unix/dylib.prf: ../../../mkspecs/features/unix/largefile.prf: ../../../mkspecs/features/dll.prf: ../../../mkspecs/features/shared.prf: ../../../mkspecs/features/warn_on.prf: ../../../mkspecs/features/qt.prf: ../../../mkspecs/features/unix/thread.prf: ../../../mkspecs/features/moc.prf: ../../../mkspecs/features/mac/rez.prf: ../../../mkspecs/features/mac/sdk.prf: ../../../mkspecs/features/resources.prf: ../../../mkspecs/features/uic.prf: ../../../mkspecs/features/yacc.prf: ../../../mkspecs/features/lex.prf: /Users/ssangkong/NVRAM_KWU/<API key>.7.4/lib/QtGui.framework/QtGui.prl: /Users/ssangkong/NVRAM_KWU/<API key>.7.4/lib/QtCore.framework/QtCore.prl: qmake: FORCE @$(QMAKE) -spec ../../../mkspecs/macx-g++ -o Makefile animatedtiles.pro animatedtiles.app/Contents/PkgInfo: @$(CHK_DIR_EXISTS) animatedtiles.app/Contents || $(MKDIR) animatedtiles.app/Contents @$(DEL_FILE) animatedtiles.app/Contents/PkgInfo @echo "APPL????" >animatedtiles.app/Contents/PkgInfo animatedtiles.app/Contents/Resources/empty.lproj: @$(CHK_DIR_EXISTS) animatedtiles.app/Contents/Resources || $(MKDIR) animatedtiles.app/Contents/Resources @touch animatedtiles.app/Contents/Resources/empty.lproj animatedtiles.app/Contents/Info.plist: @$(CHK_DIR_EXISTS) animatedtiles.app/Contents || $(MKDIR) animatedtiles.app/Contents @$(DEL_FILE) animatedtiles.app/Contents/Info.plist @sed -e "s,@ICON@,,g" -e "s,@EXECUTABLE@,animatedtiles,g" -e "s,@TYPEINFO@,????,g" ../../../mkspecs/macx-g++/Info.plist.app >animatedtiles.app/Contents/Info.plist dist: @$(CHK_DIR_EXISTS) .obj/debug-shared/animatedtiles1.0.0 || $(MKDIR) .obj/debug-shared/animatedtiles1.0.0 $(COPY_FILE) --parents $(SOURCES) $(DIST) .obj/debug-shared/animatedtiles1.0.0/ && $(COPY_FILE) --parents animatedtiles.qrc .obj/debug-shared/animatedtiles1.0.0/ && $(COPY_FILE) --parents main.cpp .obj/debug-shared/animatedtiles1.0.0/ && (cd `dirname .obj/debug-shared/animatedtiles1.0.0` && $(TAR) animatedtiles1.0.0.tar animatedtiles1.0.0 && $(COMPRESS) animatedtiles1.0.0.tar) && $(MOVE) `dirname .obj/debug-shared/animatedtiles1.0.0`/animatedtiles1.0.0.tar.gz . && $(DEL_FILE) -r .obj/debug-shared/animatedtiles1.0.0 clean:compiler_clean -$(DEL_FILE) $(OBJECTS) -$(DEL_FILE) *~ core *.core distclean: clean -$(DEL_FILE) -r animatedtiles.app -$(DEL_FILE) Makefile check: first mocclean: <API key> <API key> mocables: <API key> <API key> <API key>: <API key>: <API key>: <API key>: <API key>: .rcc/debug-shared/qrc_animatedtiles.cpp compiler_rcc_clean: -$(DEL_FILE) .rcc/debug-shared/qrc_animatedtiles.cpp .rcc/debug-shared/qrc_animatedtiles.cpp: animatedtiles.qrc /Users/ssangkong/NVRAM_KWU/<API key>.7.4/bin/rcc -name animatedtiles animatedtiles.qrc -o .rcc/debug-shared/qrc_animatedtiles.cpp <API key>: .uic/debug-shared/<API key>.cpp <API key>: -$(DEL_FILE) .uic/debug-shared/<API key>.cpp <API key>: .moc/debug-shared/main.moc <API key>: -$(DEL_FILE) .moc/debug-shared/main.moc .moc/debug-shared/main.moc: ../../../include/QtGui/QtGui \ ../../../include/QtCore/QtCore \ ../../../include/QtCore/qxmlstream.h \ ../../../src/corelib/xml/qxmlstream.h \ ../../../include/QtCore/qiodevice.h \ ../../../src/corelib/io/qiodevice.h \ ../../../include/QtCore/qobject.h \ ../../../src/corelib/kernel/qobject.h \ ../../../include/QtCore/qobjectdefs.h \ ../../../src/corelib/kernel/qobjectdefs.h \ ../../../include/QtCore/qnamespace.h \ ../../../src/corelib/global/qnamespace.h \ ../../../include/QtCore/qglobal.h \ ../../../src/corelib/global/qglobal.h \ ../../../include/QtCore/qconfig.h \ ../../../src/corelib/global/qconfig.h \ ../../../include/QtCore/qfeatures.h \ ../../../src/corelib/global/qfeatures.h \ ../../../include/QtCore/qstring.h \ ../../../src/corelib/tools/qstring.h \ ../../../include/QtCore/qchar.h \ ../../../src/corelib/tools/qchar.h \ ../../../include/QtCore/qbytearray.h \ ../../../src/corelib/tools/qbytearray.h \ ../../../include/QtCore/qatomic.h \ ../../../src/corelib/thread/qatomic.h \ ../../../include/QtCore/qbasicatomic.h \ ../../../src/corelib/thread/qbasicatomic.h \ ../../../include/QtCore/qatomic_bootstrap.h \ ../../../src/corelib/arch/qatomic_bootstrap.h \ ../../../include/QtCore/qatomic_arch.h \ ../../../src/corelib/arch/qatomic_arch.h \ ../../../include/QtCore/qatomic_vxworks.h \ ../../../src/corelib/arch/qatomic_vxworks.h \ ../../../include/QtCore/qatomic_powerpc.h \ ../../../src/corelib/arch/qatomic_powerpc.h \ ../../../include/QtCore/qatomic_alpha.h \ ../../../src/corelib/arch/qatomic_alpha.h \ ../../../include/QtCore/qatomic_arm.h \ ../../../src/corelib/arch/qatomic_arm.h \ ../../../include/QtCore/qatomic_armv6.h \ ../../../src/corelib/arch/qatomic_armv6.h \ ../../../include/QtCore/qatomic_avr32.h \ ../../../src/corelib/arch/qatomic_avr32.h \ ../../../include/QtCore/qatomic_bfin.h \ ../../../src/corelib/arch/qatomic_bfin.h \ ../../../include/QtCore/qatomic_generic.h \ ../../../src/corelib/arch/qatomic_generic.h \ ../../../include/QtCore/qatomic_i386.h \ ../../../src/corelib/arch/qatomic_i386.h \ ../../../include/QtCore/qatomic_ia64.h \ ../../../src/corelib/arch/qatomic_ia64.h \ ../../../include/QtCore/qatomic_macosx.h \ ../../../src/corelib/arch/qatomic_macosx.h \ ../../../include/QtCore/qatomic_x86_64.h \ ../../../src/corelib/arch/qatomic_x86_64.h \ ../../../include/QtCore/qatomic_mips.h \ ../../../src/corelib/arch/qatomic_mips.h \ ../../../include/QtCore/qatomic_parisc.h \ ../../../src/corelib/arch/qatomic_parisc.h \ ../../../include/QtCore/qatomic_s390.h \ ../../../src/corelib/arch/qatomic_s390.h \ ../../../include/QtCore/qatomic_sparc.h \ ../../../src/corelib/arch/qatomic_sparc.h \ ../../../include/QtCore/qatomic_windows.h \ ../../../src/corelib/arch/qatomic_windows.h \ ../../../include/QtCore/qatomic_windowsce.h \ ../../../src/corelib/arch/qatomic_windowsce.h \ ../../../include/QtCore/qatomic_symbian.h \ ../../../src/corelib/arch/qatomic_symbian.h \ ../../../include/QtCore/qatomic_sh.h \ ../../../src/corelib/arch/qatomic_sh.h \ ../../../include/QtCore/qatomic_sh4a.h \ ../../../src/corelib/arch/qatomic_sh4a.h \ ../../../include/Qt3Support/q3cstring.h \ ../../../src/qt3support/tools/q3cstring.h \ ../../../include/QtCore/qstringbuilder.h \ ../../../src/corelib/tools/qstringbuilder.h \ ../../../include/QtCore/qmap.h \ ../../../src/corelib/tools/qmap.h \ ../../../include/QtCore/qiterator.h \ ../../../src/corelib/tools/qiterator.h \ ../../../include/QtCore/qlist.h \ ../../../src/corelib/tools/qlist.h \ ../../../include/QtCore/qalgorithms.h \ ../../../src/corelib/tools/qalgorithms.h \ ../../../include/QtCore/qcoreevent.h \ ../../../src/corelib/kernel/qcoreevent.h \ ../../../include/QtCore/qscopedpointer.h \ ../../../src/corelib/tools/qscopedpointer.h \ ../../../include/QtCore/qvector.h \ ../../../src/corelib/tools/qvector.h \ ../../../include/QtCore/QPointF \ ../../../include/QtCore/qpoint.h \ ../../../src/corelib/tools/qpoint.h \ ../../../include/QtCore/QPoint \ ../../../include/QtCore/qtextcodec.h \ ../../../src/corelib/codecs/qtextcodec.h \ ../../../include/QtCore/qtextcodecplugin.h \ ../../../src/corelib/codecs/qtextcodecplugin.h \ ../../../include/QtCore/qplugin.h \ ../../../src/corelib/plugin/qplugin.h \ ../../../include/QtCore/qpointer.h \ ../../../src/corelib/kernel/qpointer.h \ ../../../include/QtCore/qfactoryinterface.h \ ../../../src/corelib/plugin/qfactoryinterface.h \ ../../../include/QtCore/qstringlist.h \ ../../../src/corelib/tools/qstringlist.h \ ../../../include/QtCore/qdatastream.h \ ../../../src/corelib/io/qdatastream.h \ ../../../include/QtCore/qregexp.h \ ../../../src/corelib/tools/qregexp.h \ ../../../include/QtCore/qstringmatcher.h \ ../../../src/corelib/tools/qstringmatcher.h \ ../../../include/Qt3Support/q3valuelist.h \ ../../../src/qt3support/tools/q3valuelist.h \ ../../../include/QtCore/qlinkedlist.h \ ../../../src/corelib/tools/qlinkedlist.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/kernel/<API key>.h \ ../../../include/QtCore/qeventloop.h \ ../../../src/corelib/kernel/qeventloop.h \ ../../../include/QtCore/qabstractitemmodel.h \ ../../../src/corelib/kernel/qabstractitemmodel.h \ ../../../include/QtCore/qvariant.h \ ../../../src/corelib/kernel/qvariant.h \ ../../../include/QtCore/qmetatype.h \ ../../../src/corelib/kernel/qmetatype.h \ ../../../include/QtCore/qhash.h \ ../../../src/corelib/tools/qhash.h \ ../../../include/QtCore/qpair.h \ ../../../src/corelib/tools/qpair.h \ ../../../include/QtCore/qbasictimer.h \ ../../../src/corelib/kernel/qbasictimer.h \ ../../../include/QtCore/qcoreapplication.h \ ../../../src/corelib/kernel/qcoreapplication.h \ ../../../include/QtCore/qmath.h \ ../../../src/corelib/kernel/qmath.h \ ../../../include/QtCore/qmetaobject.h \ ../../../src/corelib/kernel/qmetaobject.h \ ../../../include/QtCore/qmimedata.h \ ../../../src/corelib/kernel/qmimedata.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/kernel/<API key>.h \ ../../../include/QtCore/qsharedmemory.h \ ../../../src/corelib/kernel/qsharedmemory.h \ ../../../include/QtCore/qsignalmapper.h \ ../../../src/corelib/kernel/qsignalmapper.h \ ../../../include/QtCore/qsocketnotifier.h \ ../../../src/corelib/kernel/qsocketnotifier.h \ ../../../include/QtCore/qsystemsemaphore.h \ ../../../src/corelib/kernel/qsystemsemaphore.h \ ../../../include/QtCore/qtimer.h \ ../../../src/corelib/kernel/qtimer.h \ ../../../include/QtCore/qtranslator.h \ ../../../src/corelib/kernel/qtranslator.h \ ../../../include/QtCore/qabstractanimation.h \ ../../../src/corelib/animation/qabstractanimation.h \ ../../../include/QtCore/qanimationgroup.h \ ../../../src/corelib/animation/qanimationgroup.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/animation/<API key>.h \ ../../../include/QtCore/qpauseanimation.h \ ../../../src/corelib/animation/qpauseanimation.h \ ../../../include/QtCore/qpropertyanimation.h \ ../../../src/corelib/animation/qpropertyanimation.h \ ../../../include/QtCore/qvariantanimation.h \ ../../../src/corelib/animation/qvariantanimation.h \ ../../../include/QtCore/qeasingcurve.h \ ../../../src/corelib/tools/qeasingcurve.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/animation/<API key>.h \ ../../../include/QtCore/qendian.h \ ../../../src/corelib/global/qendian.h \ ../../../include/QtCore/qlibraryinfo.h \ ../../../src/corelib/global/qlibraryinfo.h \ ../../../include/QtCore/QDate \ ../../../include/QtCore/qdatetime.h \ ../../../src/corelib/tools/qdatetime.h \ ../../../include/QtCore/qsharedpointer.h \ ../../../src/corelib/tools/qsharedpointer.h \ ../../../include/QtCore/qshareddata.h \ ../../../src/corelib/tools/qshareddata.h \ ../../../include/QtCore/qsharedpointer_impl.h \ ../../../src/corelib/tools/qsharedpointer_impl.h \ ../../../include/QtCore/qnumeric.h \ ../../../src/corelib/global/qnumeric.h \ ../../../include/QtCore/qmutex.h \ ../../../src/corelib/thread/qmutex.h \ ../../../include/QtCore/qreadwritelock.h \ ../../../src/corelib/thread/qreadwritelock.h \ ../../../include/QtCore/qsemaphore.h \ ../../../src/corelib/thread/qsemaphore.h \ ../../../include/QtCore/qthread.h \ ../../../src/corelib/thread/qthread.h \ ../../../include/QtCore/qthreadstorage.h \ ../../../src/corelib/thread/qthreadstorage.h \ ../../../include/QtCore/qwaitcondition.h \ ../../../src/corelib/thread/qwaitcondition.h \ ../../../include/QtCore/qabstractstate.h \ ../../../src/corelib/statemachine/qabstractstate.h \ ../../../include/QtCore/qabstracttransition.h \ ../../../src/corelib/statemachine/qabstracttransition.h \ ../../../include/QtCore/qeventtransition.h \ ../../../src/corelib/statemachine/qeventtransition.h \ ../../../include/QtCore/qfinalstate.h \ ../../../src/corelib/statemachine/qfinalstate.h \ ../../../include/QtCore/qhistorystate.h \ ../../../src/corelib/statemachine/qhistorystate.h \ ../../../include/QtCore/qsignaltransition.h \ ../../../src/corelib/statemachine/qsignaltransition.h \ ../../../include/QtCore/qstate.h \ ../../../src/corelib/statemachine/qstate.h \ ../../../include/QtCore/qstatemachine.h \ ../../../src/corelib/statemachine/qstatemachine.h \ ../../../include/QtCore/qset.h \ ../../../src/corelib/tools/qset.h \ ../../../include/QtCore/qabstractfileengine.h \ ../../../src/corelib/io/qabstractfileengine.h \ ../../../include/QtCore/qdir.h \ ../../../src/corelib/io/qdir.h \ ../../../include/QtCore/qfileinfo.h \ ../../../src/corelib/io/qfileinfo.h \ ../../../include/QtCore/qfile.h \ ../../../src/corelib/io/qfile.h \ ../../../include/QtCore/qbuffer.h \ ../../../src/corelib/io/qbuffer.h \ ../../../include/QtCore/qdebug.h \ ../../../src/corelib/io/qdebug.h \ ../../../include/QtCore/qtextstream.h \ ../../../src/corelib/io/qtextstream.h \ ../../../include/QtCore/qlocale.h \ ../../../src/corelib/tools/qlocale.h \ ../../../include/QtCore/qcontiguouscache.h \ ../../../src/corelib/tools/qcontiguouscache.h \ ../../../include/QtCore/qdiriterator.h \ ../../../src/corelib/io/qdiriterator.h \ ../../../include/QtCore/qfilesystemwatcher.h \ ../../../src/corelib/io/qfilesystemwatcher.h \ ../../../include/QtCore/qfsfileengine.h \ ../../../src/corelib/io/qfsfileengine.h \ ../../../include/QtCore/qprocess.h \ ../../../src/corelib/io/qprocess.h \ ../../../include/QtCore/qresource.h \ ../../../src/corelib/io/qresource.h \ ../../../include/QtCore/qsettings.h \ ../../../src/corelib/io/qsettings.h \ ../../../include/QtCore/qtemporaryfile.h \ ../../../src/corelib/io/qtemporaryfile.h \ ../../../include/QtCore/qurl.h \ ../../../src/corelib/io/qurl.h \ ../../../include/QtCore/qfuture.h \ ../../../src/corelib/concurrent/qfuture.h \ ../../../include/QtCore/qfutureinterface.h \ ../../../src/corelib/concurrent/qfutureinterface.h \ ../../../include/QtCore/qrunnable.h \ ../../../src/corelib/concurrent/qrunnable.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/concurrent/<API key>.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/concurrent/<API key>.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/concurrent/<API key>.h \ ../../../include/QtCore/qfuturesynchronizer.h \ ../../../src/corelib/concurrent/qfuturesynchronizer.h \ ../../../include/QtCore/qfuturewatcher.h \ ../../../src/corelib/concurrent/qfuturewatcher.h \ ../../../include/QtCore/qtconcurrentfilter.h \ ../../../src/corelib/concurrent/qtconcurrentfilter.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/concurrent/<API key>.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/concurrent/<API key>.h \ ../../../include/QtCore/qtconcurrentmedian.h \ ../../../src/corelib/concurrent/qtconcurrentmedian.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/concurrent/<API key>.h \ ../../../include/QtCore/qthreadpool.h \ ../../../src/corelib/concurrent/qthreadpool.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/concurrent/<API key>.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/concurrent/<API key>.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/concurrent/<API key>.h \ ../../../include/QtCore/qtconcurrentmap.h \ ../../../src/corelib/concurrent/qtconcurrentmap.h \ ../../../include/QtCore/qtconcurrentrun.h \ ../../../src/corelib/concurrent/qtconcurrentrun.h \ ../../../include/QtCore/qtconcurrentrunbase.h \ ../../../src/corelib/concurrent/qtconcurrentrunbase.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/concurrent/<API key>.h \ ../../../include/QtCore/qlibrary.h \ ../../../src/corelib/plugin/qlibrary.h \ ../../../include/QtCore/qpluginloader.h \ ../../../src/corelib/plugin/qpluginloader.h \ ../../../include/QtCore/quuid.h \ ../../../src/corelib/plugin/quuid.h \ ../../../include/QtCore/qbitarray.h \ ../../../src/corelib/tools/qbitarray.h \ ../../../include/QtCore/qbytearraymatcher.h \ ../../../src/corelib/tools/qbytearraymatcher.h \ ../../../include/QtCore/qcache.h \ ../../../src/corelib/tools/qcache.h \ ../../../include/QtCore/qcontainerfwd.h \ ../../../src/corelib/tools/qcontainerfwd.h \ ../../../include/QtCore/qcryptographichash.h \ ../../../src/corelib/tools/qcryptographichash.h \ ../../../include/QtCore/qelapsedtimer.h \ ../../../src/corelib/tools/qelapsedtimer.h \ ../../../include/QtCore/qline.h \ ../../../src/corelib/tools/qline.h \ ../../../include/QtCore/qmargins.h \ ../../../src/corelib/tools/qmargins.h \ ../../../include/QtCore/qqueue.h \ ../../../src/corelib/tools/qqueue.h \ ../../../include/QtCore/qrect.h \ ../../../src/corelib/tools/qrect.h \ ../../../include/QtCore/qsize.h \ ../../../src/corelib/tools/qsize.h \ ../../../include/QtCore/qstack.h \ ../../../src/corelib/tools/qstack.h \ ../../../include/QtCore/qtextboundaryfinder.h \ ../../../src/corelib/tools/qtextboundaryfinder.h \ ../../../include/QtCore/qtimeline.h \ ../../../src/corelib/tools/qtimeline.h \ ../../../include/QtCore/qvarlengtharray.h \ ../../../src/corelib/tools/qvarlengtharray.h \ ../../../include/QtGui/qbrush.h \ ../../../src/gui/painting/qbrush.h \ ../../../include/QtGui/qcolor.h \ ../../../src/gui/painting/qcolor.h \ ../../../include/QtGui/qrgb.h \ ../../../src/gui/painting/qrgb.h \ ../../../include/QtGui/qmatrix.h \ ../../../src/gui/painting/qmatrix.h \ ../../../include/QtGui/qpolygon.h \ ../../../src/gui/painting/qpolygon.h \ ../../../include/QtGui/qregion.h \ ../../../src/gui/painting/qregion.h \ ../../../include/QtGui/qwindowdefs.h \ ../../../src/gui/kernel/qwindowdefs.h \ ../../../include/QtGui/qmacdefines_mac.h \ ../../../src/gui/kernel/qmacdefines_mac.h \ ../../../include/QtGui/qwindowdefs_win.h \ ../../../src/gui/kernel/qwindowdefs_win.h \ ../../../include/QtGui/qwmatrix.h \ ../../../src/gui/painting/qwmatrix.h \ ../../../include/QtGui/qtransform.h \ ../../../src/gui/painting/qtransform.h \ ../../../include/QtGui/qpainterpath.h \ ../../../src/gui/painting/qpainterpath.h \ ../../../include/QtGui/qimage.h \ ../../../src/gui/image/qimage.h \ ../../../include/QtGui/qpaintdevice.h \ ../../../src/gui/painting/qpaintdevice.h \ ../../../include/QtGui/qpixmap.h \ ../../../src/gui/image/qpixmap.h \ ../../../include/QtGui/qcolormap.h \ ../../../src/gui/painting/qcolormap.h \ ../../../include/QtGui/qdrawutil.h \ ../../../src/gui/painting/qdrawutil.h \ ../../../include/QtGui/qpaintengine.h \ ../../../src/gui/painting/qpaintengine.h \ ../../../include/QtGui/qpainter.h \ ../../../src/gui/painting/qpainter.h \ ../../../include/QtGui/qtextoption.h \ ../../../src/gui/text/qtextoption.h \ ../../../include/QtGui/qpen.h \ ../../../src/gui/painting/qpen.h \ ../../../include/QtGui/qfontinfo.h \ ../../../src/gui/text/qfontinfo.h \ ../../../include/QtGui/qfont.h \ ../../../src/gui/text/qfont.h \ ../../../include/QtGui/qfontmetrics.h \ ../../../src/gui/text/qfontmetrics.h \ ../../../include/QtGui/qprintengine.h \ ../../../src/gui/painting/qprintengine.h \ ../../../include/QtGui/qprinter.h \ ../../../src/gui/painting/qprinter.h \ ../../../include/QtGui/qprinterinfo.h \ ../../../src/gui/painting/qprinterinfo.h \ ../../../include/QtGui/QPrinter \ ../../../include/QtCore/QList \ ../../../include/QtGui/qstylepainter.h \ ../../../src/gui/painting/qstylepainter.h \ ../../../include/QtGui/qstyle.h \ ../../../src/gui/styles/qstyle.h \ ../../../include/QtGui/qicon.h \ ../../../src/gui/image/qicon.h \ ../../../include/QtGui/qpalette.h \ ../../../src/gui/kernel/qpalette.h \ ../../../include/QtGui/qsizepolicy.h \ ../../../src/gui/kernel/qsizepolicy.h \ ../../../include/QtGui/qwidget.h \ ../../../src/gui/kernel/qwidget.h \ ../../../include/QtGui/qcursor.h \ ../../../src/gui/kernel/qcursor.h \ ../../../include/QtGui/qkeysequence.h \ ../../../src/gui/kernel/qkeysequence.h \ ../../../include/QtGui/qevent.h \ ../../../src/gui/kernel/qevent.h \ ../../../include/QtGui/qmime.h \ ../../../src/gui/kernel/qmime.h \ ../../../include/QtGui/qdrag.h \ ../../../src/gui/kernel/qdrag.h \ ../../../include/QtGui/qaction.h \ ../../../src/gui/kernel/qaction.h \ ../../../include/QtGui/qactiongroup.h \ ../../../src/gui/kernel/qactiongroup.h \ ../../../include/QtGui/qapplication.h \ ../../../src/gui/kernel/qapplication.h \ ../../../include/QtGui/qdesktopwidget.h \ ../../../src/gui/kernel/qdesktopwidget.h \ ../../../include/QtGui/qtransportauth_qws.h \ ../../../src/gui/embedded/qtransportauth_qws.h \ ../../../include/QtGui/qboxlayout.h \ ../../../src/gui/kernel/qboxlayout.h \ ../../../include/QtGui/qlayout.h \ ../../../src/gui/kernel/qlayout.h \ ../../../include/QtGui/qlayoutitem.h \ ../../../src/gui/kernel/qlayoutitem.h \ ../../../include/QtGui/qgridlayout.h \ ../../../src/gui/kernel/qgridlayout.h \ ../../../include/QtGui/qclipboard.h \ ../../../src/gui/kernel/qclipboard.h \ ../../../include/QtGui/qformlayout.h \ ../../../src/gui/kernel/qformlayout.h \ ../../../include/QtGui/QLayout \ ../../../include/QtGui/qgesture.h \ ../../../src/gui/kernel/qgesture.h \ ../../../include/QtGui/qgesturerecognizer.h \ ../../../src/gui/kernel/qgesturerecognizer.h \ ../../../include/QtGui/qsessionmanager.h \ ../../../src/gui/kernel/qsessionmanager.h \ ../../../include/QtGui/qshortcut.h \ ../../../src/gui/kernel/qshortcut.h \ ../../../include/QtGui/qsound.h \ ../../../src/gui/kernel/qsound.h \ ../../../include/QtGui/qstackedlayout.h \ ../../../src/gui/kernel/qstackedlayout.h \ ../../../include/QtGui/qtooltip.h \ ../../../src/gui/kernel/qtooltip.h \ ../../../include/QtGui/qwhatsthis.h \ ../../../src/gui/kernel/qwhatsthis.h \ ../../../include/QtGui/qwidgetaction.h \ ../../../src/gui/kernel/qwidgetaction.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/graphicsview/<API key>.h \ ../../../include/QtGui/qgraphicsitem.h \ ../../../src/gui/graphicsview/qgraphicsitem.h \ ../../../include/QtGui/qgraphicslayout.h \ ../../../src/gui/graphicsview/qgraphicslayout.h \ ../../../include/QtGui/qgraphicslayoutitem.h \ ../../../src/gui/graphicsview/qgraphicslayoutitem.h \ ../../../include/QtGui/qgraphicsgridlayout.h \ ../../../src/gui/graphicsview/qgraphicsgridlayout.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/graphicsview/<API key>.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/graphicsview/<API key>.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/graphicsview/<API key>.h \ ../../../include/QtGui/qgraphicswidget.h \ ../../../src/gui/graphicsview/qgraphicswidget.h \ ../../../include/QtGui/qgraphicsscene.h \ ../../../src/gui/graphicsview/qgraphicsscene.h \ ../../../include/QtGui/qgraphicssceneevent.h \ ../../../src/gui/graphicsview/qgraphicssceneevent.h \ ../../../include/QtGui/qgraphicstransform.h \ ../../../src/gui/graphicsview/qgraphicstransform.h \ ../../../include/QtCore/QObject \ ../../../include/QtGui/QVector3D \ ../../../include/QtGui/qvector3d.h \ ../../../src/gui/math3d/qvector3d.h \ ../../../include/QtGui/QTransform \ ../../../include/QtGui/QMatrix4x4 \ ../../../include/QtGui/qmatrix4x4.h \ ../../../src/gui/math3d/qmatrix4x4.h \ ../../../include/QtGui/qvector4d.h \ ../../../src/gui/math3d/qvector4d.h \ ../../../include/QtGui/qquaternion.h \ ../../../src/gui/math3d/qquaternion.h \ ../../../include/QtGui/qgenericmatrix.h \ ../../../src/gui/math3d/qgenericmatrix.h \ ../../../include/QtGui/qgraphicsview.h \ ../../../src/gui/graphicsview/qgraphicsview.h \ ../../../include/QtGui/qscrollarea.h \ ../../../src/gui/widgets/qscrollarea.h \ ../../../include/QtGui/qabstractscrollarea.h \ ../../../src/gui/widgets/qabstractscrollarea.h \ ../../../include/QtGui/qframe.h \ ../../../src/gui/widgets/qframe.h \ ../../../include/QtGui/qkeyeventtransition.h \ ../../../src/gui/statemachine/qkeyeventtransition.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/statemachine/<API key>.h \ ../../../include/QtGui/qbitmap.h \ ../../../src/gui/image/qbitmap.h \ ../../../include/QtGui/qiconengine.h \ ../../../src/gui/image/qiconengine.h \ ../../../include/QtGui/qiconengineplugin.h \ ../../../src/gui/image/qiconengineplugin.h \ ../../../include/QtGui/qimageiohandler.h \ ../../../src/gui/image/qimageiohandler.h \ ../../../include/QtGui/qimagereader.h \ ../../../src/gui/image/qimagereader.h \ ../../../include/QtGui/qimagewriter.h \ ../../../src/gui/image/qimagewriter.h \ ../../../include/QtGui/qmovie.h \ ../../../src/gui/image/qmovie.h \ ../../../include/QtGui/qpicture.h \ ../../../src/gui/image/qpicture.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/image/<API key>.h \ ../../../include/QtGui/qpixmapcache.h \ ../../../src/gui/image/qpixmapcache.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/text/<API key>.h \ ../../../include/QtGui/qtextlayout.h \ ../../../src/gui/text/qtextlayout.h \ ../../../include/QtGui/qtextformat.h \ ../../../src/gui/text/qtextformat.h \ ../../../include/QtGui/qtextdocument.h \ ../../../src/gui/text/qtextdocument.h \ ../../../include/QtGui/qtextcursor.h \ ../../../src/gui/text/qtextcursor.h \ ../../../include/QtGui/qfontdatabase.h \ ../../../src/gui/text/qfontdatabase.h \ ../../../include/QtGui/qstatictext.h \ ../../../src/gui/text/qstatictext.h \ ../../../include/QtGui/qsyntaxhighlighter.h \ ../../../src/gui/text/qsyntaxhighlighter.h \ ../../../include/QtGui/qtextobject.h \ ../../../src/gui/text/qtextobject.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/text/<API key>.h \ ../../../include/QtGui/qtextdocumentwriter.h \ ../../../src/gui/text/qtextdocumentwriter.h \ ../../../include/QtGui/qtextlist.h \ ../../../src/gui/text/qtextlist.h \ ../../../include/QtGui/qtexttable.h \ ../../../src/gui/text/qtexttable.h \ ../../../include/QtGui/qvector2d.h \ ../../../src/gui/math3d/qvector2d.h \ ../../../include/QtGui/qabstractbutton.h \ ../../../src/gui/widgets/qabstractbutton.h \ ../../../include/QtGui/qabstractslider.h \ ../../../src/gui/widgets/qabstractslider.h \ ../../../include/QtGui/qabstractspinbox.h \ ../../../src/gui/widgets/qabstractspinbox.h \ ../../../include/QtGui/qvalidator.h \ ../../../src/gui/widgets/qvalidator.h \ ../../../include/QtGui/qbuttongroup.h \ ../../../src/gui/widgets/qbuttongroup.h \ ../../../include/QtGui/qcalendarwidget.h \ ../../../src/gui/widgets/qcalendarwidget.h \ ../../../include/QtGui/qcheckbox.h \ ../../../src/gui/widgets/qcheckbox.h \ ../../../include/QtGui/qcombobox.h \ ../../../src/gui/widgets/qcombobox.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/itemviews/<API key>.h \ ../../../include/QtGui/qstyleoption.h \ ../../../src/gui/styles/qstyleoption.h \ ../../../include/QtGui/qslider.h \ ../../../src/gui/widgets/qslider.h \ ../../../include/QtGui/qtabbar.h \ ../../../src/gui/widgets/qtabbar.h \ ../../../include/QtGui/qtabwidget.h \ ../../../src/gui/widgets/qtabwidget.h \ ../../../include/QtGui/qrubberband.h \ ../../../src/gui/widgets/qrubberband.h \ ../../../include/QtGui/qcommandlinkbutton.h \ ../../../src/gui/widgets/qcommandlinkbutton.h \ ../../../include/QtGui/qpushbutton.h \ ../../../src/gui/widgets/qpushbutton.h \ ../../../include/QtGui/qdatetimeedit.h \ ../../../src/gui/widgets/qdatetimeedit.h \ ../../../include/QtGui/qdial.h \ ../../../src/gui/widgets/qdial.h \ ../../../include/QtGui/qdialogbuttonbox.h \ ../../../src/gui/widgets/qdialogbuttonbox.h \ ../../../include/QtGui/qdockwidget.h \ ../../../src/gui/widgets/qdockwidget.h \ ../../../include/QtGui/qfocusframe.h \ ../../../src/gui/widgets/qfocusframe.h \ ../../../include/QtGui/qfontcombobox.h \ ../../../src/gui/widgets/qfontcombobox.h \ ../../../include/QtGui/qgroupbox.h \ ../../../src/gui/widgets/qgroupbox.h \ ../../../include/QtGui/qlabel.h \ ../../../src/gui/widgets/qlabel.h \ ../../../include/QtGui/qlcdnumber.h \ ../../../src/gui/widgets/qlcdnumber.h \ ../../../include/QtGui/qlineedit.h \ ../../../src/gui/widgets/qlineedit.h \ ../../../include/QtGui/qmainwindow.h \ ../../../src/gui/widgets/qmainwindow.h \ ../../../include/QtGui/qmdiarea.h \ ../../../src/gui/widgets/qmdiarea.h \ ../../../include/QtGui/qmdisubwindow.h \ ../../../src/gui/widgets/qmdisubwindow.h \ ../../../include/QtGui/qmenu.h \ ../../../src/gui/widgets/qmenu.h \ ../../../include/QtGui/qmenubar.h \ ../../../src/gui/widgets/qmenubar.h \ ../../../include/QtGui/qmenudata.h \ ../../../src/gui/widgets/qmenudata.h \ ../../../include/QtGui/qplaintextedit.h \ ../../../src/gui/widgets/qplaintextedit.h \ ../../../include/QtGui/qtextedit.h \ ../../../src/gui/widgets/qtextedit.h \ ../../../include/QtGui/qprintpreviewwidget.h \ ../../../src/gui/widgets/qprintpreviewwidget.h \ ../../../include/QtGui/qprogressbar.h \ ../../../src/gui/widgets/qprogressbar.h \ ../../../include/QtGui/qradiobutton.h \ ../../../src/gui/widgets/qradiobutton.h \ ../../../include/QtGui/qscrollbar.h \ ../../../src/gui/widgets/qscrollbar.h \ ../../../include/QtGui/qsizegrip.h \ ../../../src/gui/widgets/qsizegrip.h \ ../../../include/QtGui/qspinbox.h \ ../../../src/gui/widgets/qspinbox.h \ ../../../include/QtGui/qsplashscreen.h \ ../../../src/gui/widgets/qsplashscreen.h \ ../../../include/QtGui/qsplitter.h \ ../../../src/gui/widgets/qsplitter.h \ ../../../include/QtGui/qstackedwidget.h \ ../../../src/gui/widgets/qstackedwidget.h \ ../../../include/QtGui/qstatusbar.h \ ../../../src/gui/widgets/qstatusbar.h \ ../../../include/QtGui/qtextbrowser.h \ ../../../src/gui/widgets/qtextbrowser.h \ ../../../include/QtGui/qtoolbar.h \ ../../../src/gui/widgets/qtoolbar.h \ ../../../include/QtGui/qtoolbox.h \ ../../../src/gui/widgets/qtoolbox.h \ ../../../include/QtGui/qtoolbutton.h \ ../../../src/gui/widgets/qtoolbutton.h \ ../../../include/QtGui/qworkspace.h \ ../../../src/gui/widgets/qworkspace.h \ ../../../include/QtGui/qaccessible.h \ ../../../src/gui/accessible/qaccessible.h \ ../../../include/QtGui/qaccessible2.h \ ../../../src/gui/accessible/qaccessible2.h \ ../../../include/QtGui/qaccessiblebridge.h \ ../../../src/gui/accessible/qaccessiblebridge.h \ ../../../include/QtGui/qaccessibleobject.h \ ../../../src/gui/accessible/qaccessibleobject.h \ ../../../include/QtGui/qaccessibleplugin.h \ ../../../src/gui/accessible/qaccessibleplugin.h \ ../../../include/QtGui/qaccessiblewidget.h \ ../../../src/gui/accessible/qaccessiblewidget.h \ ../../../include/QtGui/qsymbianevent.h \ ../../../src/gui/symbian/qsymbianevent.h \ ../../../include/QtGui/qcompleter.h \ ../../../src/gui/util/qcompleter.h \ ../../../include/QtGui/qdesktopservices.h \ ../../../src/gui/util/qdesktopservices.h \ ../../../include/QtGui/qsystemtrayicon.h \ ../../../src/gui/util/qsystemtrayicon.h \ ../../../include/QtGui/qundogroup.h \ ../../../src/gui/util/qundogroup.h \ ../../../include/QtGui/qundostack.h \ ../../../src/gui/util/qundostack.h \ ../../../include/QtGui/qundoview.h \ ../../../src/gui/util/qundoview.h \ ../../../include/QtGui/qlistview.h \ ../../../src/gui/itemviews/qlistview.h \ ../../../include/QtGui/qabstractitemview.h \ ../../../src/gui/itemviews/qabstractitemview.h \ ../../../include/QtGui/qitemselectionmodel.h \ ../../../src/gui/itemviews/qitemselectionmodel.h \ ../../../include/QtGui/qcdestyle.h \ ../../../src/gui/styles/qcdestyle.h \ ../../../include/QtGui/qmotifstyle.h \ ../../../src/gui/styles/qmotifstyle.h \ ../../../include/QtGui/qcommonstyle.h \ ../../../src/gui/styles/qcommonstyle.h \ ../../../include/QtGui/qcleanlooksstyle.h \ ../../../src/gui/styles/qcleanlooksstyle.h \ ../../../include/QtGui/qwindowsstyle.h \ ../../../src/gui/styles/qwindowsstyle.h \ ../../../include/QtGui/qgtkstyle.h \ ../../../src/gui/styles/qgtkstyle.h \ ../../../include/QtGui/QCleanlooksStyle \ ../../../include/QtGui/QPalette \ ../../../include/QtGui/QFont \ ../../../include/QtGui/QFileDialog \ ../../../include/QtGui/qfiledialog.h \ ../../../src/gui/dialogs/qfiledialog.h \ ../../../include/QtGui/qdialog.h \ ../../../src/gui/dialogs/qdialog.h \ ../../../include/QtGui/qplastiquestyle.h \ ../../../src/gui/styles/qplastiquestyle.h \ ../../../include/QtGui/qproxystyle.h \ ../../../src/gui/styles/qproxystyle.h \ ../../../include/QtGui/QCommonStyle \ ../../../include/QtGui/qs60style.h \ ../../../src/gui/styles/qs60style.h \ ../../../include/QtGui/qstylefactory.h \ ../../../src/gui/styles/qstylefactory.h \ ../../../include/QtGui/qstyleplugin.h \ ../../../src/gui/styles/qstyleplugin.h \ ../../../include/QtGui/qwindowscestyle.h \ ../../../src/gui/styles/qwindowscestyle.h \ ../../../include/QtGui/qwindowsmobilestyle.h \ ../../../src/gui/styles/qwindowsmobilestyle.h \ ../../../include/QtGui/qwindowsvistastyle.h \ ../../../src/gui/styles/qwindowsvistastyle.h \ ../../../include/QtGui/qwindowsxpstyle.h \ ../../../src/gui/styles/qwindowsxpstyle.h \ ../../../include/QtGui/qabstractproxymodel.h \ ../../../src/gui/itemviews/qabstractproxymodel.h \ ../../../include/QtGui/qcolumnview.h \ ../../../src/gui/itemviews/qcolumnview.h \ ../../../include/QtGui/qdatawidgetmapper.h \ ../../../src/gui/itemviews/qdatawidgetmapper.h \ ../../../include/QtGui/qdirmodel.h \ ../../../src/gui/itemviews/qdirmodel.h \ ../../../include/QtGui/qfileiconprovider.h \ ../../../src/gui/itemviews/qfileiconprovider.h \ ../../../include/QtGui/qheaderview.h \ ../../../src/gui/itemviews/qheaderview.h \ ../../../include/QtGui/qitemdelegate.h \ ../../../src/gui/itemviews/qitemdelegate.h \ ../../../include/QtGui/qitemeditorfactory.h \ ../../../src/gui/itemviews/qitemeditorfactory.h \ ../../../include/QtGui/qlistwidget.h \ ../../../src/gui/itemviews/qlistwidget.h \ ../../../include/QtGui/qproxymodel.h \ ../../../src/gui/itemviews/qproxymodel.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/itemviews/<API key>.h \ ../../../include/QtGui/qstandarditemmodel.h \ ../../../src/gui/itemviews/qstandarditemmodel.h \ ../../../include/QtGui/qstringlistmodel.h \ ../../../src/gui/itemviews/qstringlistmodel.h \ ../../../include/QtGui/qstyleditemdelegate.h \ ../../../src/gui/itemviews/qstyleditemdelegate.h \ ../../../include/QtGui/qtableview.h \ ../../../src/gui/itemviews/qtableview.h \ ../../../include/QtGui/qtablewidget.h \ ../../../src/gui/itemviews/qtablewidget.h \ ../../../include/QtGui/qtreeview.h \ ../../../src/gui/itemviews/qtreeview.h \ ../../../include/QtGui/qtreewidget.h \ ../../../src/gui/itemviews/qtreewidget.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/itemviews/<API key>.h \ ../../../include/QtGui/qgraphicseffect.h \ ../../../src/gui/effects/qgraphicseffect.h \ ../../../include/QtGui/qs60mainapplication.h \ ../../../src/gui/s60framework/qs60mainapplication.h \ ../../../include/QtGui/qs60mainappui.h \ ../../../src/gui/s60framework/qs60mainappui.h \ ../../../include/QtGui/qs60maindocument.h \ ../../../src/gui/s60framework/qs60maindocument.h \ ../../../include/QtGui/qinputcontext.h \ ../../../src/gui/inputmethod/qinputcontext.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/inputmethod/<API key>.h \ ../../../include/QtGui/qinputcontextplugin.h \ ../../../src/gui/inputmethod/qinputcontextplugin.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/dialogs/<API key>.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/dialogs/<API key>.h \ ../../../include/QtGui/qcolordialog.h \ ../../../src/gui/dialogs/qcolordialog.h \ ../../../include/QtGui/qerrormessage.h \ ../../../src/gui/dialogs/qerrormessage.h \ ../../../include/QtGui/qfilesystemmodel.h \ ../../../src/gui/dialogs/qfilesystemmodel.h \ ../../../include/QtGui/qfontdialog.h \ ../../../src/gui/dialogs/qfontdialog.h \ ../../../include/QtGui/qinputdialog.h \ ../../../src/gui/dialogs/qinputdialog.h \ ../../../include/QtGui/qmessagebox.h \ ../../../src/gui/dialogs/qmessagebox.h \ ../../../include/QtGui/qpagesetupdialog.h \ ../../../src/gui/dialogs/qpagesetupdialog.h \ ../../../include/QtGui/qprintdialog.h \ ../../../src/gui/dialogs/qprintdialog.h \ ../../../include/QtGui/qprintpreviewdialog.h \ ../../../src/gui/dialogs/qprintpreviewdialog.h \ ../../../include/QtGui/qprogressdialog.h \ ../../../src/gui/dialogs/qprogressdialog.h \ ../../../include/QtGui/qwizard.h \ ../../../src/gui/dialogs/qwizard.h \ ../../../include/QtGui/qvfbhdr.h \ ../../../src/gui/embedded/qvfbhdr.h \ ../../../include/QtGui/qwsembedwidget.h \ ../../../src/gui/embedded/qwsembedwidget.h \ main.cpp /Users/ssangkong/NVRAM_KWU/<API key>.7.4/bin/moc $(DEFINES) $(INCPATH) -D__APPLE__ -D__GNUC__ main.cpp -o .moc/debug-shared/main.moc <API key>: <API key>: <API key>: compiler_uic_clean: <API key>: <API key>: <API key>: <API key>: <API key>: compiler_lex_clean: compiler_clean: compiler_rcc_clean <API key> .obj/debug-shared/main.o: main.cpp ../../../include/QtGui/QtGui \ ../../../include/QtCore/QtCore \ ../../../include/QtCore/qxmlstream.h \ ../../../src/corelib/xml/qxmlstream.h \ ../../../include/QtCore/qiodevice.h \ ../../../src/corelib/io/qiodevice.h \ ../../../include/QtCore/qobject.h \ ../../../src/corelib/kernel/qobject.h \ ../../../include/QtCore/qobjectdefs.h \ ../../../src/corelib/kernel/qobjectdefs.h \ ../../../include/QtCore/qnamespace.h \ ../../../src/corelib/global/qnamespace.h \ ../../../include/QtCore/qglobal.h \ ../../../src/corelib/global/qglobal.h \ ../../../include/QtCore/qconfig.h \ ../../../src/corelib/global/qconfig.h \ ../../../include/QtCore/qfeatures.h \ ../../../src/corelib/global/qfeatures.h \ ../../../include/QtCore/qstring.h \ ../../../src/corelib/tools/qstring.h \ ../../../include/QtCore/qchar.h \ ../../../src/corelib/tools/qchar.h \ ../../../include/QtCore/qbytearray.h \ ../../../src/corelib/tools/qbytearray.h \ ../../../include/QtCore/qatomic.h \ ../../../src/corelib/thread/qatomic.h \ ../../../include/QtCore/qbasicatomic.h \ ../../../src/corelib/thread/qbasicatomic.h \ ../../../include/QtCore/qatomic_bootstrap.h \ ../../../src/corelib/arch/qatomic_bootstrap.h \ ../../../include/QtCore/qatomic_arch.h \ ../../../src/corelib/arch/qatomic_arch.h \ ../../../include/QtCore/qatomic_vxworks.h \ ../../../src/corelib/arch/qatomic_vxworks.h \ ../../../include/QtCore/qatomic_powerpc.h \ ../../../src/corelib/arch/qatomic_powerpc.h \ ../../../include/QtCore/qatomic_alpha.h \ ../../../src/corelib/arch/qatomic_alpha.h \ ../../../include/QtCore/qatomic_arm.h \ ../../../src/corelib/arch/qatomic_arm.h \ ../../../include/QtCore/qatomic_armv6.h \ ../../../src/corelib/arch/qatomic_armv6.h \ ../../../include/QtCore/qatomic_avr32.h \ ../../../src/corelib/arch/qatomic_avr32.h \ ../../../include/QtCore/qatomic_bfin.h \ ../../../src/corelib/arch/qatomic_bfin.h \ ../../../include/QtCore/qatomic_generic.h \ ../../../src/corelib/arch/qatomic_generic.h \ ../../../include/QtCore/qatomic_i386.h \ ../../../src/corelib/arch/qatomic_i386.h \ ../../../include/QtCore/qatomic_ia64.h \ ../../../src/corelib/arch/qatomic_ia64.h \ ../../../include/QtCore/qatomic_macosx.h \ ../../../src/corelib/arch/qatomic_macosx.h \ ../../../include/QtCore/qatomic_x86_64.h \ ../../../src/corelib/arch/qatomic_x86_64.h \ ../../../include/QtCore/qatomic_mips.h \ ../../../src/corelib/arch/qatomic_mips.h \ ../../../include/QtCore/qatomic_parisc.h \ ../../../src/corelib/arch/qatomic_parisc.h \ ../../../include/QtCore/qatomic_s390.h \ ../../../src/corelib/arch/qatomic_s390.h \ ../../../include/QtCore/qatomic_sparc.h \ ../../../src/corelib/arch/qatomic_sparc.h \ ../../../include/QtCore/qatomic_windows.h \ ../../../src/corelib/arch/qatomic_windows.h \ ../../../include/QtCore/qatomic_windowsce.h \ ../../../src/corelib/arch/qatomic_windowsce.h \ ../../../include/QtCore/qatomic_symbian.h \ ../../../src/corelib/arch/qatomic_symbian.h \ ../../../include/QtCore/qatomic_sh.h \ ../../../src/corelib/arch/qatomic_sh.h \ ../../../include/QtCore/qatomic_sh4a.h \ ../../../src/corelib/arch/qatomic_sh4a.h \ ../../../include/Qt3Support/q3cstring.h \ ../../../src/qt3support/tools/q3cstring.h \ ../../../include/QtCore/qstringbuilder.h \ ../../../src/corelib/tools/qstringbuilder.h \ ../../../include/QtCore/qmap.h \ ../../../src/corelib/tools/qmap.h \ ../../../include/QtCore/qiterator.h \ ../../../src/corelib/tools/qiterator.h \ ../../../include/QtCore/qlist.h \ ../../../src/corelib/tools/qlist.h \ ../../../include/QtCore/qalgorithms.h \ ../../../src/corelib/tools/qalgorithms.h \ ../../../include/QtCore/qcoreevent.h \ ../../../src/corelib/kernel/qcoreevent.h \ ../../../include/QtCore/qscopedpointer.h \ ../../../src/corelib/tools/qscopedpointer.h \ ../../../include/QtCore/qvector.h \ ../../../src/corelib/tools/qvector.h \ ../../../include/QtCore/QPointF \ ../../../include/QtCore/qpoint.h \ ../../../src/corelib/tools/qpoint.h \ ../../../include/QtCore/QPoint \ ../../../include/QtCore/qtextcodec.h \ ../../../src/corelib/codecs/qtextcodec.h \ ../../../include/QtCore/qtextcodecplugin.h \ ../../../src/corelib/codecs/qtextcodecplugin.h \ ../../../include/QtCore/qplugin.h \ ../../../src/corelib/plugin/qplugin.h \ ../../../include/QtCore/qpointer.h \ ../../../src/corelib/kernel/qpointer.h \ ../../../include/QtCore/qfactoryinterface.h \ ../../../src/corelib/plugin/qfactoryinterface.h \ ../../../include/QtCore/qstringlist.h \ ../../../src/corelib/tools/qstringlist.h \ ../../../include/QtCore/qdatastream.h \ ../../../src/corelib/io/qdatastream.h \ ../../../include/QtCore/qregexp.h \ ../../../src/corelib/tools/qregexp.h \ ../../../include/QtCore/qstringmatcher.h \ ../../../src/corelib/tools/qstringmatcher.h \ ../../../include/Qt3Support/q3valuelist.h \ ../../../src/qt3support/tools/q3valuelist.h \ ../../../include/QtCore/qlinkedlist.h \ ../../../src/corelib/tools/qlinkedlist.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/kernel/<API key>.h \ ../../../include/QtCore/qeventloop.h \ ../../../src/corelib/kernel/qeventloop.h \ ../../../include/QtCore/qabstractitemmodel.h \ ../../../src/corelib/kernel/qabstractitemmodel.h \ ../../../include/QtCore/qvariant.h \ ../../../src/corelib/kernel/qvariant.h \ ../../../include/QtCore/qmetatype.h \ ../../../src/corelib/kernel/qmetatype.h \ ../../../include/QtCore/qhash.h \ ../../../src/corelib/tools/qhash.h \ ../../../include/QtCore/qpair.h \ ../../../src/corelib/tools/qpair.h \ ../../../include/QtCore/qbasictimer.h \ ../../../src/corelib/kernel/qbasictimer.h \ ../../../include/QtCore/qcoreapplication.h \ ../../../src/corelib/kernel/qcoreapplication.h \ ../../../include/QtCore/qmath.h \ ../../../src/corelib/kernel/qmath.h \ ../../../include/QtCore/qmetaobject.h \ ../../../src/corelib/kernel/qmetaobject.h \ ../../../include/QtCore/qmimedata.h \ ../../../src/corelib/kernel/qmimedata.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/kernel/<API key>.h \ ../../../include/QtCore/qsharedmemory.h \ ../../../src/corelib/kernel/qsharedmemory.h \ ../../../include/QtCore/qsignalmapper.h \ ../../../src/corelib/kernel/qsignalmapper.h \ ../../../include/QtCore/qsocketnotifier.h \ ../../../src/corelib/kernel/qsocketnotifier.h \ ../../../include/QtCore/qsystemsemaphore.h \ ../../../src/corelib/kernel/qsystemsemaphore.h \ ../../../include/QtCore/qtimer.h \ ../../../src/corelib/kernel/qtimer.h \ ../../../include/QtCore/qtranslator.h \ ../../../src/corelib/kernel/qtranslator.h \ ../../../include/QtCore/qabstractanimation.h \ ../../../src/corelib/animation/qabstractanimation.h \ ../../../include/QtCore/qanimationgroup.h \ ../../../src/corelib/animation/qanimationgroup.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/animation/<API key>.h \ ../../../include/QtCore/qpauseanimation.h \ ../../../src/corelib/animation/qpauseanimation.h \ ../../../include/QtCore/qpropertyanimation.h \ ../../../src/corelib/animation/qpropertyanimation.h \ ../../../include/QtCore/qvariantanimation.h \ ../../../src/corelib/animation/qvariantanimation.h \ ../../../include/QtCore/qeasingcurve.h \ ../../../src/corelib/tools/qeasingcurve.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/animation/<API key>.h \ ../../../include/QtCore/qendian.h \ ../../../src/corelib/global/qendian.h \ ../../../include/QtCore/qlibraryinfo.h \ ../../../src/corelib/global/qlibraryinfo.h \ ../../../include/QtCore/QDate \ ../../../include/QtCore/qdatetime.h \ ../../../src/corelib/tools/qdatetime.h \ ../../../include/QtCore/qsharedpointer.h \ ../../../src/corelib/tools/qsharedpointer.h \ ../../../include/QtCore/qshareddata.h \ ../../../src/corelib/tools/qshareddata.h \ ../../../include/QtCore/qsharedpointer_impl.h \ ../../../src/corelib/tools/qsharedpointer_impl.h \ ../../../include/QtCore/qnumeric.h \ ../../../src/corelib/global/qnumeric.h \ ../../../include/QtCore/qmutex.h \ ../../../src/corelib/thread/qmutex.h \ ../../../include/QtCore/qreadwritelock.h \ ../../../src/corelib/thread/qreadwritelock.h \ ../../../include/QtCore/qsemaphore.h \ ../../../src/corelib/thread/qsemaphore.h \ ../../../include/QtCore/qthread.h \ ../../../src/corelib/thread/qthread.h \ ../../../include/QtCore/qthreadstorage.h \ ../../../src/corelib/thread/qthreadstorage.h \ ../../../include/QtCore/qwaitcondition.h \ ../../../src/corelib/thread/qwaitcondition.h \ ../../../include/QtCore/qabstractstate.h \ ../../../src/corelib/statemachine/qabstractstate.h \ ../../../include/QtCore/qabstracttransition.h \ ../../../src/corelib/statemachine/qabstracttransition.h \ ../../../include/QtCore/qeventtransition.h \ ../../../src/corelib/statemachine/qeventtransition.h \ ../../../include/QtCore/qfinalstate.h \ ../../../src/corelib/statemachine/qfinalstate.h \ ../../../include/QtCore/qhistorystate.h \ ../../../src/corelib/statemachine/qhistorystate.h \ ../../../include/QtCore/qsignaltransition.h \ ../../../src/corelib/statemachine/qsignaltransition.h \ ../../../include/QtCore/qstate.h \ ../../../src/corelib/statemachine/qstate.h \ ../../../include/QtCore/qstatemachine.h \ ../../../src/corelib/statemachine/qstatemachine.h \ ../../../include/QtCore/qset.h \ ../../../src/corelib/tools/qset.h \ ../../../include/QtCore/qabstractfileengine.h \ ../../../src/corelib/io/qabstractfileengine.h \ ../../../include/QtCore/qdir.h \ ../../../src/corelib/io/qdir.h \ ../../../include/QtCore/qfileinfo.h \ ../../../src/corelib/io/qfileinfo.h \ ../../../include/QtCore/qfile.h \ ../../../src/corelib/io/qfile.h \ ../../../include/QtCore/qbuffer.h \ ../../../src/corelib/io/qbuffer.h \ ../../../include/QtCore/qdebug.h \ ../../../src/corelib/io/qdebug.h \ ../../../include/QtCore/qtextstream.h \ ../../../src/corelib/io/qtextstream.h \ ../../../include/QtCore/qlocale.h \ ../../../src/corelib/tools/qlocale.h \ ../../../include/QtCore/qcontiguouscache.h \ ../../../src/corelib/tools/qcontiguouscache.h \ ../../../include/QtCore/qdiriterator.h \ ../../../src/corelib/io/qdiriterator.h \ ../../../include/QtCore/qfilesystemwatcher.h \ ../../../src/corelib/io/qfilesystemwatcher.h \ ../../../include/QtCore/qfsfileengine.h \ ../../../src/corelib/io/qfsfileengine.h \ ../../../include/QtCore/qprocess.h \ ../../../src/corelib/io/qprocess.h \ ../../../include/QtCore/qresource.h \ ../../../src/corelib/io/qresource.h \ ../../../include/QtCore/qsettings.h \ ../../../src/corelib/io/qsettings.h \ ../../../include/QtCore/qtemporaryfile.h \ ../../../src/corelib/io/qtemporaryfile.h \ ../../../include/QtCore/qurl.h \ ../../../src/corelib/io/qurl.h \ ../../../include/QtCore/qfuture.h \ ../../../src/corelib/concurrent/qfuture.h \ ../../../include/QtCore/qfutureinterface.h \ ../../../src/corelib/concurrent/qfutureinterface.h \ ../../../include/QtCore/qrunnable.h \ ../../../src/corelib/concurrent/qrunnable.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/concurrent/<API key>.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/concurrent/<API key>.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/concurrent/<API key>.h \ ../../../include/QtCore/qfuturesynchronizer.h \ ../../../src/corelib/concurrent/qfuturesynchronizer.h \ ../../../include/QtCore/qfuturewatcher.h \ ../../../src/corelib/concurrent/qfuturewatcher.h \ ../../../include/QtCore/qtconcurrentfilter.h \ ../../../src/corelib/concurrent/qtconcurrentfilter.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/concurrent/<API key>.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/concurrent/<API key>.h \ ../../../include/QtCore/qtconcurrentmedian.h \ ../../../src/corelib/concurrent/qtconcurrentmedian.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/concurrent/<API key>.h \ ../../../include/QtCore/qthreadpool.h \ ../../../src/corelib/concurrent/qthreadpool.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/concurrent/<API key>.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/concurrent/<API key>.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/concurrent/<API key>.h \ ../../../include/QtCore/qtconcurrentmap.h \ ../../../src/corelib/concurrent/qtconcurrentmap.h \ ../../../include/QtCore/qtconcurrentrun.h \ ../../../src/corelib/concurrent/qtconcurrentrun.h \ ../../../include/QtCore/qtconcurrentrunbase.h \ ../../../src/corelib/concurrent/qtconcurrentrunbase.h \ ../../../include/QtCore/<API key>.h \ ../../../src/corelib/concurrent/<API key>.h \ ../../../include/QtCore/qlibrary.h \ ../../../src/corelib/plugin/qlibrary.h \ ../../../include/QtCore/qpluginloader.h \ ../../../src/corelib/plugin/qpluginloader.h \ ../../../include/QtCore/quuid.h \ ../../../src/corelib/plugin/quuid.h \ ../../../include/QtCore/qbitarray.h \ ../../../src/corelib/tools/qbitarray.h \ ../../../include/QtCore/qbytearraymatcher.h \ ../../../src/corelib/tools/qbytearraymatcher.h \ ../../../include/QtCore/qcache.h \ ../../../src/corelib/tools/qcache.h \ ../../../include/QtCore/qcontainerfwd.h \ ../../../src/corelib/tools/qcontainerfwd.h \ ../../../include/QtCore/qcryptographichash.h \ ../../../src/corelib/tools/qcryptographichash.h \ ../../../include/QtCore/qelapsedtimer.h \ ../../../src/corelib/tools/qelapsedtimer.h \ ../../../include/QtCore/qline.h \ ../../../src/corelib/tools/qline.h \ ../../../include/QtCore/qmargins.h \ ../../../src/corelib/tools/qmargins.h \ ../../../include/QtCore/qqueue.h \ ../../../src/corelib/tools/qqueue.h \ ../../../include/QtCore/qrect.h \ ../../../src/corelib/tools/qrect.h \ ../../../include/QtCore/qsize.h \ ../../../src/corelib/tools/qsize.h \ ../../../include/QtCore/qstack.h \ ../../../src/corelib/tools/qstack.h \ ../../../include/QtCore/qtextboundaryfinder.h \ ../../../src/corelib/tools/qtextboundaryfinder.h \ ../../../include/QtCore/qtimeline.h \ ../../../src/corelib/tools/qtimeline.h \ ../../../include/QtCore/qvarlengtharray.h \ ../../../src/corelib/tools/qvarlengtharray.h \ ../../../include/QtGui/qbrush.h \ ../../../src/gui/painting/qbrush.h \ ../../../include/QtGui/qcolor.h \ ../../../src/gui/painting/qcolor.h \ ../../../include/QtGui/qrgb.h \ ../../../src/gui/painting/qrgb.h \ ../../../include/QtGui/qmatrix.h \ ../../../src/gui/painting/qmatrix.h \ ../../../include/QtGui/qpolygon.h \ ../../../src/gui/painting/qpolygon.h \ ../../../include/QtGui/qregion.h \ ../../../src/gui/painting/qregion.h \ ../../../include/QtGui/qwindowdefs.h \ ../../../src/gui/kernel/qwindowdefs.h \ ../../../include/QtGui/qmacdefines_mac.h \ ../../../src/gui/kernel/qmacdefines_mac.h \ ../../../include/QtGui/qwindowdefs_win.h \ ../../../src/gui/kernel/qwindowdefs_win.h \ ../../../include/QtGui/qwmatrix.h \ ../../../src/gui/painting/qwmatrix.h \ ../../../include/QtGui/qtransform.h \ ../../../src/gui/painting/qtransform.h \ ../../../include/QtGui/qpainterpath.h \ ../../../src/gui/painting/qpainterpath.h \ ../../../include/QtGui/qimage.h \ ../../../src/gui/image/qimage.h \ ../../../include/QtGui/qpaintdevice.h \ ../../../src/gui/painting/qpaintdevice.h \ ../../../include/QtGui/qpixmap.h \ ../../../src/gui/image/qpixmap.h \ ../../../include/QtGui/qcolormap.h \ ../../../src/gui/painting/qcolormap.h \ ../../../include/QtGui/qdrawutil.h \ ../../../src/gui/painting/qdrawutil.h \ ../../../include/QtGui/qpaintengine.h \ ../../../src/gui/painting/qpaintengine.h \ ../../../include/QtGui/qpainter.h \ ../../../src/gui/painting/qpainter.h \ ../../../include/QtGui/qtextoption.h \ ../../../src/gui/text/qtextoption.h \ ../../../include/QtGui/qpen.h \ ../../../src/gui/painting/qpen.h \ ../../../include/QtGui/qfontinfo.h \ ../../../src/gui/text/qfontinfo.h \ ../../../include/QtGui/qfont.h \ ../../../src/gui/text/qfont.h \ ../../../include/QtGui/qfontmetrics.h \ ../../../src/gui/text/qfontmetrics.h \ ../../../include/QtGui/qprintengine.h \ ../../../src/gui/painting/qprintengine.h \ ../../../include/QtGui/qprinter.h \ ../../../src/gui/painting/qprinter.h \ ../../../include/QtGui/qprinterinfo.h \ ../../../src/gui/painting/qprinterinfo.h \ ../../../include/QtGui/QPrinter \ ../../../include/QtCore/QList \ ../../../include/QtGui/qstylepainter.h \ ../../../src/gui/painting/qstylepainter.h \ ../../../include/QtGui/qstyle.h \ ../../../src/gui/styles/qstyle.h \ ../../../include/QtGui/qicon.h \ ../../../src/gui/image/qicon.h \ ../../../include/QtGui/qpalette.h \ ../../../src/gui/kernel/qpalette.h \ ../../../include/QtGui/qsizepolicy.h \ ../../../src/gui/kernel/qsizepolicy.h \ ../../../include/QtGui/qwidget.h \ ../../../src/gui/kernel/qwidget.h \ ../../../include/QtGui/qcursor.h \ ../../../src/gui/kernel/qcursor.h \ ../../../include/QtGui/qkeysequence.h \ ../../../src/gui/kernel/qkeysequence.h \ ../../../include/QtGui/qevent.h \ ../../../src/gui/kernel/qevent.h \ ../../../include/QtGui/qmime.h \ ../../../src/gui/kernel/qmime.h \ ../../../include/QtGui/qdrag.h \ ../../../src/gui/kernel/qdrag.h \ ../../../include/QtGui/qaction.h \ ../../../src/gui/kernel/qaction.h \ ../../../include/QtGui/qactiongroup.h \ ../../../src/gui/kernel/qactiongroup.h \ ../../../include/QtGui/qapplication.h \ ../../../src/gui/kernel/qapplication.h \ ../../../include/QtGui/qdesktopwidget.h \ ../../../src/gui/kernel/qdesktopwidget.h \ ../../../include/QtGui/qtransportauth_qws.h \ ../../../src/gui/embedded/qtransportauth_qws.h \ ../../../include/QtGui/qboxlayout.h \ ../../../src/gui/kernel/qboxlayout.h \ ../../../include/QtGui/qlayout.h \ ../../../src/gui/kernel/qlayout.h \ ../../../include/QtGui/qlayoutitem.h \ ../../../src/gui/kernel/qlayoutitem.h \ ../../../include/QtGui/qgridlayout.h \ ../../../src/gui/kernel/qgridlayout.h \ ../../../include/QtGui/qclipboard.h \ ../../../src/gui/kernel/qclipboard.h \ ../../../include/QtGui/qformlayout.h \ ../../../src/gui/kernel/qformlayout.h \ ../../../include/QtGui/QLayout \ ../../../include/QtGui/qgesture.h \ ../../../src/gui/kernel/qgesture.h \ ../../../include/QtGui/qgesturerecognizer.h \ ../../../src/gui/kernel/qgesturerecognizer.h \ ../../../include/QtGui/qsessionmanager.h \ ../../../src/gui/kernel/qsessionmanager.h \ ../../../include/QtGui/qshortcut.h \ ../../../src/gui/kernel/qshortcut.h \ ../../../include/QtGui/qsound.h \ ../../../src/gui/kernel/qsound.h \ ../../../include/QtGui/qstackedlayout.h \ ../../../src/gui/kernel/qstackedlayout.h \ ../../../include/QtGui/qtooltip.h \ ../../../src/gui/kernel/qtooltip.h \ ../../../include/QtGui/qwhatsthis.h \ ../../../src/gui/kernel/qwhatsthis.h \ ../../../include/QtGui/qwidgetaction.h \ ../../../src/gui/kernel/qwidgetaction.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/graphicsview/<API key>.h \ ../../../include/QtGui/qgraphicsitem.h \ ../../../src/gui/graphicsview/qgraphicsitem.h \ ../../../include/QtGui/qgraphicslayout.h \ ../../../src/gui/graphicsview/qgraphicslayout.h \ ../../../include/QtGui/qgraphicslayoutitem.h \ ../../../src/gui/graphicsview/qgraphicslayoutitem.h \ ../../../include/QtGui/qgraphicsgridlayout.h \ ../../../src/gui/graphicsview/qgraphicsgridlayout.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/graphicsview/<API key>.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/graphicsview/<API key>.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/graphicsview/<API key>.h \ ../../../include/QtGui/qgraphicswidget.h \ ../../../src/gui/graphicsview/qgraphicswidget.h \ ../../../include/QtGui/qgraphicsscene.h \ ../../../src/gui/graphicsview/qgraphicsscene.h \ ../../../include/QtGui/qgraphicssceneevent.h \ ../../../src/gui/graphicsview/qgraphicssceneevent.h \ ../../../include/QtGui/qgraphicstransform.h \ ../../../src/gui/graphicsview/qgraphicstransform.h \ ../../../include/QtCore/QObject \ ../../../include/QtGui/QVector3D \ ../../../include/QtGui/qvector3d.h \ ../../../src/gui/math3d/qvector3d.h \ ../../../include/QtGui/QTransform \ ../../../include/QtGui/QMatrix4x4 \ ../../../include/QtGui/qmatrix4x4.h \ ../../../src/gui/math3d/qmatrix4x4.h \ ../../../include/QtGui/qvector4d.h \ ../../../src/gui/math3d/qvector4d.h \ ../../../include/QtGui/qquaternion.h \ ../../../src/gui/math3d/qquaternion.h \ ../../../include/QtGui/qgenericmatrix.h \ ../../../src/gui/math3d/qgenericmatrix.h \ ../../../include/QtGui/qgraphicsview.h \ ../../../src/gui/graphicsview/qgraphicsview.h \ ../../../include/QtGui/qscrollarea.h \ ../../../src/gui/widgets/qscrollarea.h \ ../../../include/QtGui/qabstractscrollarea.h \ ../../../src/gui/widgets/qabstractscrollarea.h \ ../../../include/QtGui/qframe.h \ ../../../src/gui/widgets/qframe.h \ ../../../include/QtGui/qkeyeventtransition.h \ ../../../src/gui/statemachine/qkeyeventtransition.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/statemachine/<API key>.h \ ../../../include/QtGui/qbitmap.h \ ../../../src/gui/image/qbitmap.h \ ../../../include/QtGui/qiconengine.h \ ../../../src/gui/image/qiconengine.h \ ../../../include/QtGui/qiconengineplugin.h \ ../../../src/gui/image/qiconengineplugin.h \ ../../../include/QtGui/qimageiohandler.h \ ../../../src/gui/image/qimageiohandler.h \ ../../../include/QtGui/qimagereader.h \ ../../../src/gui/image/qimagereader.h \ ../../../include/QtGui/qimagewriter.h \ ../../../src/gui/image/qimagewriter.h \ ../../../include/QtGui/qmovie.h \ ../../../src/gui/image/qmovie.h \ ../../../include/QtGui/qpicture.h \ ../../../src/gui/image/qpicture.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/image/<API key>.h \ ../../../include/QtGui/qpixmapcache.h \ ../../../src/gui/image/qpixmapcache.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/text/<API key>.h \ ../../../include/QtGui/qtextlayout.h \ ../../../src/gui/text/qtextlayout.h \ ../../../include/QtGui/qtextformat.h \ ../../../src/gui/text/qtextformat.h \ ../../../include/QtGui/qtextdocument.h \ ../../../src/gui/text/qtextdocument.h \ ../../../include/QtGui/qtextcursor.h \ ../../../src/gui/text/qtextcursor.h \ ../../../include/QtGui/qfontdatabase.h \ ../../../src/gui/text/qfontdatabase.h \ ../../../include/QtGui/qstatictext.h \ ../../../src/gui/text/qstatictext.h \ ../../../include/QtGui/qsyntaxhighlighter.h \ ../../../src/gui/text/qsyntaxhighlighter.h \ ../../../include/QtGui/qtextobject.h \ ../../../src/gui/text/qtextobject.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/text/<API key>.h \ ../../../include/QtGui/qtextdocumentwriter.h \ ../../../src/gui/text/qtextdocumentwriter.h \ ../../../include/QtGui/qtextlist.h \ ../../../src/gui/text/qtextlist.h \ ../../../include/QtGui/qtexttable.h \ ../../../src/gui/text/qtexttable.h \ ../../../include/QtGui/qvector2d.h \ ../../../src/gui/math3d/qvector2d.h \ ../../../include/QtGui/qabstractbutton.h \ ../../../src/gui/widgets/qabstractbutton.h \ ../../../include/QtGui/qabstractslider.h \ ../../../src/gui/widgets/qabstractslider.h \ ../../../include/QtGui/qabstractspinbox.h \ ../../../src/gui/widgets/qabstractspinbox.h \ ../../../include/QtGui/qvalidator.h \ ../../../src/gui/widgets/qvalidator.h \ ../../../include/QtGui/qbuttongroup.h \ ../../../src/gui/widgets/qbuttongroup.h \ ../../../include/QtGui/qcalendarwidget.h \ ../../../src/gui/widgets/qcalendarwidget.h \ ../../../include/QtGui/qcheckbox.h \ ../../../src/gui/widgets/qcheckbox.h \ ../../../include/QtGui/qcombobox.h \ ../../../src/gui/widgets/qcombobox.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/itemviews/<API key>.h \ ../../../include/QtGui/qstyleoption.h \ ../../../src/gui/styles/qstyleoption.h \ ../../../include/QtGui/qslider.h \ ../../../src/gui/widgets/qslider.h \ ../../../include/QtGui/qtabbar.h \ ../../../src/gui/widgets/qtabbar.h \ ../../../include/QtGui/qtabwidget.h \ ../../../src/gui/widgets/qtabwidget.h \ ../../../include/QtGui/qrubberband.h \ ../../../src/gui/widgets/qrubberband.h \ ../../../include/QtGui/qcommandlinkbutton.h \ ../../../src/gui/widgets/qcommandlinkbutton.h \ ../../../include/QtGui/qpushbutton.h \ ../../../src/gui/widgets/qpushbutton.h \ ../../../include/QtGui/qdatetimeedit.h \ ../../../src/gui/widgets/qdatetimeedit.h \ ../../../include/QtGui/qdial.h \ ../../../src/gui/widgets/qdial.h \ ../../../include/QtGui/qdialogbuttonbox.h \ ../../../src/gui/widgets/qdialogbuttonbox.h \ ../../../include/QtGui/qdockwidget.h \ ../../../src/gui/widgets/qdockwidget.h \ ../../../include/QtGui/qfocusframe.h \ ../../../src/gui/widgets/qfocusframe.h \ ../../../include/QtGui/qfontcombobox.h \ ../../../src/gui/widgets/qfontcombobox.h \ ../../../include/QtGui/qgroupbox.h \ ../../../src/gui/widgets/qgroupbox.h \ ../../../include/QtGui/qlabel.h \ ../../../src/gui/widgets/qlabel.h \ ../../../include/QtGui/qlcdnumber.h \ ../../../src/gui/widgets/qlcdnumber.h \ ../../../include/QtGui/qlineedit.h \ ../../../src/gui/widgets/qlineedit.h \ ../../../include/QtGui/qmainwindow.h \ ../../../src/gui/widgets/qmainwindow.h \ ../../../include/QtGui/qmdiarea.h \ ../../../src/gui/widgets/qmdiarea.h \ ../../../include/QtGui/qmdisubwindow.h \ ../../../src/gui/widgets/qmdisubwindow.h \ ../../../include/QtGui/qmenu.h \ ../../../src/gui/widgets/qmenu.h \ ../../../include/QtGui/qmenubar.h \ ../../../src/gui/widgets/qmenubar.h \ ../../../include/QtGui/qmenudata.h \ ../../../src/gui/widgets/qmenudata.h \ ../../../include/QtGui/qplaintextedit.h \ ../../../src/gui/widgets/qplaintextedit.h \ ../../../include/QtGui/qtextedit.h \ ../../../src/gui/widgets/qtextedit.h \ ../../../include/QtGui/qprintpreviewwidget.h \ ../../../src/gui/widgets/qprintpreviewwidget.h \ ../../../include/QtGui/qprogressbar.h \ ../../../src/gui/widgets/qprogressbar.h \ ../../../include/QtGui/qradiobutton.h \ ../../../src/gui/widgets/qradiobutton.h \ ../../../include/QtGui/qscrollbar.h \ ../../../src/gui/widgets/qscrollbar.h \ ../../../include/QtGui/qsizegrip.h \ ../../../src/gui/widgets/qsizegrip.h \ ../../../include/QtGui/qspinbox.h \ ../../../src/gui/widgets/qspinbox.h \ ../../../include/QtGui/qsplashscreen.h \ ../../../src/gui/widgets/qsplashscreen.h \ ../../../include/QtGui/qsplitter.h \ ../../../src/gui/widgets/qsplitter.h \ ../../../include/QtGui/qstackedwidget.h \ ../../../src/gui/widgets/qstackedwidget.h \ ../../../include/QtGui/qstatusbar.h \ ../../../src/gui/widgets/qstatusbar.h \ ../../../include/QtGui/qtextbrowser.h \ ../../../src/gui/widgets/qtextbrowser.h \ ../../../include/QtGui/qtoolbar.h \ ../../../src/gui/widgets/qtoolbar.h \ ../../../include/QtGui/qtoolbox.h \ ../../../src/gui/widgets/qtoolbox.h \ ../../../include/QtGui/qtoolbutton.h \ ../../../src/gui/widgets/qtoolbutton.h \ ../../../include/QtGui/qworkspace.h \ ../../../src/gui/widgets/qworkspace.h \ ../../../include/QtGui/qaccessible.h \ ../../../src/gui/accessible/qaccessible.h \ ../../../include/QtGui/qaccessible2.h \ ../../../src/gui/accessible/qaccessible2.h \ ../../../include/QtGui/qaccessiblebridge.h \ ../../../src/gui/accessible/qaccessiblebridge.h \ ../../../include/QtGui/qaccessibleobject.h \ ../../../src/gui/accessible/qaccessibleobject.h \ ../../../include/QtGui/qaccessibleplugin.h \ ../../../src/gui/accessible/qaccessibleplugin.h \ ../../../include/QtGui/qaccessiblewidget.h \ ../../../src/gui/accessible/qaccessiblewidget.h \ ../../../include/QtGui/qsymbianevent.h \ ../../../src/gui/symbian/qsymbianevent.h \ ../../../include/QtGui/qcompleter.h \ ../../../src/gui/util/qcompleter.h \ ../../../include/QtGui/qdesktopservices.h \ ../../../src/gui/util/qdesktopservices.h \ ../../../include/QtGui/qsystemtrayicon.h \ ../../../src/gui/util/qsystemtrayicon.h \ ../../../include/QtGui/qundogroup.h \ ../../../src/gui/util/qundogroup.h \ ../../../include/QtGui/qundostack.h \ ../../../src/gui/util/qundostack.h \ ../../../include/QtGui/qundoview.h \ ../../../src/gui/util/qundoview.h \ ../../../include/QtGui/qlistview.h \ ../../../src/gui/itemviews/qlistview.h \ ../../../include/QtGui/qabstractitemview.h \ ../../../src/gui/itemviews/qabstractitemview.h \ ../../../include/QtGui/qitemselectionmodel.h \ ../../../src/gui/itemviews/qitemselectionmodel.h \ ../../../include/QtGui/qcdestyle.h \ ../../../src/gui/styles/qcdestyle.h \ ../../../include/QtGui/qmotifstyle.h \ ../../../src/gui/styles/qmotifstyle.h \ ../../../include/QtGui/qcommonstyle.h \ ../../../src/gui/styles/qcommonstyle.h \ ../../../include/QtGui/qcleanlooksstyle.h \ ../../../src/gui/styles/qcleanlooksstyle.h \ ../../../include/QtGui/qwindowsstyle.h \ ../../../src/gui/styles/qwindowsstyle.h \ ../../../include/QtGui/qgtkstyle.h \ ../../../src/gui/styles/qgtkstyle.h \ ../../../include/QtGui/QCleanlooksStyle \ ../../../include/QtGui/QPalette \ ../../../include/QtGui/QFont \ ../../../include/QtGui/QFileDialog \ ../../../include/QtGui/qfiledialog.h \ ../../../src/gui/dialogs/qfiledialog.h \ ../../../include/QtGui/qdialog.h \ ../../../src/gui/dialogs/qdialog.h \ ../../../include/QtGui/qplastiquestyle.h \ ../../../src/gui/styles/qplastiquestyle.h \ ../../../include/QtGui/qproxystyle.h \ ../../../src/gui/styles/qproxystyle.h \ ../../../include/QtGui/QCommonStyle \ ../../../include/QtGui/qs60style.h \ ../../../src/gui/styles/qs60style.h \ ../../../include/QtGui/qstylefactory.h \ ../../../src/gui/styles/qstylefactory.h \ ../../../include/QtGui/qstyleplugin.h \ ../../../src/gui/styles/qstyleplugin.h \ ../../../include/QtGui/qwindowscestyle.h \ ../../../src/gui/styles/qwindowscestyle.h \ ../../../include/QtGui/qwindowsmobilestyle.h \ ../../../src/gui/styles/qwindowsmobilestyle.h \ ../../../include/QtGui/qwindowsvistastyle.h \ ../../../src/gui/styles/qwindowsvistastyle.h \ ../../../include/QtGui/qwindowsxpstyle.h \ ../../../src/gui/styles/qwindowsxpstyle.h \ ../../../include/QtGui/qabstractproxymodel.h \ ../../../src/gui/itemviews/qabstractproxymodel.h \ ../../../include/QtGui/qcolumnview.h \ ../../../src/gui/itemviews/qcolumnview.h \ ../../../include/QtGui/qdatawidgetmapper.h \ ../../../src/gui/itemviews/qdatawidgetmapper.h \ ../../../include/QtGui/qdirmodel.h \ ../../../src/gui/itemviews/qdirmodel.h \ ../../../include/QtGui/qfileiconprovider.h \ ../../../src/gui/itemviews/qfileiconprovider.h \ ../../../include/QtGui/qheaderview.h \ ../../../src/gui/itemviews/qheaderview.h \ ../../../include/QtGui/qitemdelegate.h \ ../../../src/gui/itemviews/qitemdelegate.h \ ../../../include/QtGui/qitemeditorfactory.h \ ../../../src/gui/itemviews/qitemeditorfactory.h \ ../../../include/QtGui/qlistwidget.h \ ../../../src/gui/itemviews/qlistwidget.h \ ../../../include/QtGui/qproxymodel.h \ ../../../src/gui/itemviews/qproxymodel.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/itemviews/<API key>.h \ ../../../include/QtGui/qstandarditemmodel.h \ ../../../src/gui/itemviews/qstandarditemmodel.h \ ../../../include/QtGui/qstringlistmodel.h \ ../../../src/gui/itemviews/qstringlistmodel.h \ ../../../include/QtGui/qstyleditemdelegate.h \ ../../../src/gui/itemviews/qstyleditemdelegate.h \ ../../../include/QtGui/qtableview.h \ ../../../src/gui/itemviews/qtableview.h \ ../../../include/QtGui/qtablewidget.h \ ../../../src/gui/itemviews/qtablewidget.h \ ../../../include/QtGui/qtreeview.h \ ../../../src/gui/itemviews/qtreeview.h \ ../../../include/QtGui/qtreewidget.h \ ../../../src/gui/itemviews/qtreewidget.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/itemviews/<API key>.h \ ../../../include/QtGui/qgraphicseffect.h \ ../../../src/gui/effects/qgraphicseffect.h \ ../../../include/QtGui/qs60mainapplication.h \ ../../../src/gui/s60framework/qs60mainapplication.h \ ../../../include/QtGui/qs60mainappui.h \ ../../../src/gui/s60framework/qs60mainappui.h \ ../../../include/QtGui/qs60maindocument.h \ ../../../src/gui/s60framework/qs60maindocument.h \ ../../../include/QtGui/qinputcontext.h \ ../../../src/gui/inputmethod/qinputcontext.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/inputmethod/<API key>.h \ ../../../include/QtGui/qinputcontextplugin.h \ ../../../src/gui/inputmethod/qinputcontextplugin.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/dialogs/<API key>.h \ ../../../include/QtGui/<API key>.h \ ../../../src/gui/dialogs/<API key>.h \ ../../../include/QtGui/qcolordialog.h \ ../../../src/gui/dialogs/qcolordialog.h \ ../../../include/QtGui/qerrormessage.h \ ../../../src/gui/dialogs/qerrormessage.h \ ../../../include/QtGui/qfilesystemmodel.h \ ../../../src/gui/dialogs/qfilesystemmodel.h \ ../../../include/QtGui/qfontdialog.h \ ../../../src/gui/dialogs/qfontdialog.h \ ../../../include/QtGui/qinputdialog.h \ ../../../src/gui/dialogs/qinputdialog.h \ ../../../include/QtGui/qmessagebox.h \ ../../../src/gui/dialogs/qmessagebox.h \ ../../../include/QtGui/qpagesetupdialog.h \ ../../../src/gui/dialogs/qpagesetupdialog.h \ ../../../include/QtGui/qprintdialog.h \ ../../../src/gui/dialogs/qprintdialog.h \ ../../../include/QtGui/qprintpreviewdialog.h \ ../../../src/gui/dialogs/qprintpreviewdialog.h \ ../../../include/QtGui/qprogressdialog.h \ ../../../src/gui/dialogs/qprogressdialog.h \ ../../../include/QtGui/qwizard.h \ ../../../src/gui/dialogs/qwizard.h \ ../../../include/QtGui/qvfbhdr.h \ ../../../src/gui/embedded/qvfbhdr.h \ ../../../include/QtGui/qwsembedwidget.h \ ../../../src/gui/embedded/qwsembedwidget.h \ .moc/debug-shared/main.moc $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/debug-shared/main.o main.cpp .obj/debug-shared/qrc_animatedtiles.o: .rcc/debug-shared/qrc_animatedtiles.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/debug-shared/qrc_animatedtiles.o .rcc/debug-shared/qrc_animatedtiles.cpp install_target: all FORCE @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/ $(DEL_FILE) -r "$(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/animatedtiles.app" -$(INSTALL_DIR) "animatedtiles.app" "$(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/animatedtiles.app" uninstall_target: FORCE -$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/animatedtiles.app" -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/ install_sources: all FORCE @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/ -$(INSTALL_FILE) /Users/ssangkong/NVRAM_KWU/<API key>.7.4/examples/animation/animatedtiles/main.cpp $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/ -$(INSTALL_FILE) /Users/ssangkong/NVRAM_KWU/<API key>.7.4/examples/animation/animatedtiles/animatedtiles.qrc $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/ -$(INSTALL_FILE) /Users/ssangkong/NVRAM_KWU/<API key>.7.4/examples/animation/animatedtiles/animatedtiles.pro $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/ -$(INSTALL_DIR) /Users/ssangkong/NVRAM_KWU/<API key>.7.4/examples/animation/animatedtiles/images $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/ uninstall_sources: FORCE -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/main.cpp -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/animatedtiles.qrc -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/animatedtiles.pro -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/images -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/Trolltech/Qt-4.7.4/examples/animation/animatedtiles/ install: install_target install_sources FORCE uninstall: uninstall_target uninstall_sources FORCE FORCE:
package repack.org.bouncycastle.crypto.agreement; import repack.org.bouncycastle.crypto.BasicAgreement; import repack.org.bouncycastle.crypto.CipherParameters; import repack.org.bouncycastle.crypto.params.ECDomainParameters; import repack.org.bouncycastle.crypto.params.<API key>; import repack.org.bouncycastle.crypto.params.<API key>; import repack.org.bouncycastle.crypto.params.<API key>; import repack.org.bouncycastle.crypto.params.MQVPublicParameters; import repack.org.bouncycastle.math.ec.ECAlgorithms; import repack.org.bouncycastle.math.ec.ECConstants; import repack.org.bouncycastle.math.ec.ECPoint; import java.math.BigInteger; public class ECMQVBasicAgreement implements BasicAgreement { <API key> privParams; public void init( CipherParameters key) { this.privParams = (<API key>) key; } public BigInteger calculateAgreement(CipherParameters pubKey) { MQVPublicParameters pubParams = (MQVPublicParameters) pubKey; <API key> staticPrivateKey = privParams.getStaticPrivateKey(); ECPoint agreement = <API key>(staticPrivateKey.getParameters(), staticPrivateKey, privParams.<API key>(), privParams.<API key>(), pubParams.getStaticPublicKey(), pubParams.<API key>()); return agreement.getX().toBigInteger(); } // The ECMQV Primitive as described in SEC-1, 3.4 private ECPoint <API key>( ECDomainParameters parameters, <API key> d1U, <API key> d2U, <API key> Q2U, <API key> Q1V, <API key> Q2V) { BigInteger n = parameters.getN(); int e = (n.bitLength() + 1) / 2; BigInteger powE = ECConstants.ONE.shiftLeft(e); // The Q2U public key is optional ECPoint q; if(Q2U == null) { q = parameters.getG().multiply(d2U.getD()); } else { q = Q2U.getQ(); } BigInteger x = q.getX().toBigInteger(); BigInteger xBar = x.mod(powE); BigInteger Q2UBar = xBar.setBit(e); BigInteger s = d1U.getD().multiply(Q2UBar).mod(n).add(d2U.getD()).mod(n); BigInteger xPrime = Q2V.getQ().getX().toBigInteger(); BigInteger xPrimeBar = xPrime.mod(powE); BigInteger Q2VBar = xPrimeBar.setBit(e); BigInteger hs = parameters.getH().multiply(s).mod(n); // ECPoint p = Q1V.getQ().multiply(Q2VBar).add(Q2V.getQ()).multiply(hs); ECPoint p = ECAlgorithms.sumOfTwoMultiplies( Q1V.getQ(), Q2VBar.multiply(hs).mod(n), Q2V.getQ(), hs); if(p.isInfinity()) { throw new <API key>("Infinity is not a valid agreement value for MQV"); } return p; } }
package settings; public class <API key> { private String terminalCommand; private String <API key>; public <API key>() { } public <API key>(String terminalCommand, String <API key>) { this.terminalCommand = terminalCommand; this.<API key> = <API key>; } public String getTerminalCommand() { return terminalCommand; } public void setTerminalCommand(String terminalCommand) { this.terminalCommand = terminalCommand; } public String <API key>() { return <API key>; } public void <API key>(String <API key>) { this.<API key> = <API key>; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; <API key> that = (<API key>) o; if (!terminalCommand.equals(that.terminalCommand)) return false; return <API key>.equals(that.<API key>); } @Override public int hashCode() { int result = terminalCommand.hashCode(); result = 31 * result + <API key>.hashCode(); return result; } }
#ifndef GMPY_PRP_H #define GMPY_PRP_H #ifdef __cplusplus extern "C" { #endif static PyObject * <API key>(PyObject *self, PyObject *args); static PyObject * <API key>(PyObject *self, PyObject *args); static PyObject * <API key>(PyObject *self, PyObject *args); static PyObject * <API key>(PyObject *self, PyObject *args); static PyObject * <API key>(PyObject *self, PyObject *args); static PyObject * <API key>(PyObject *self, PyObject *args); static PyObject * <API key>(PyObject *self, PyObject *args); static PyObject * <API key>(PyObject *self, PyObject *args); static PyObject * <API key>(PyObject *self, PyObject *args); static PyObject * <API key>(PyObject *self, PyObject *args); static PyObject * <API key>(PyObject *self, PyObject *args); #ifdef __cplusplus } #endif #endif
<?php namespace pocketmine\item; class Melon extends Food{ public function __construct($meta = 0, $count = 1){ parent::__construct(self::MELON, $meta, $count, "Melon"); } public function getFoodRestore(){ return 2; } public function <API key>(){ return 1.2; } }
#ifndef <API key> #define <API key> #include "<API key>.h" #include "<API key>.h" namespace QtAws { namespace PinpointEmail { class <API key>; class <API key> : public <API key> { public: <API key>(const <API key>::Action action, <API key> * const q); <API key>(const <API key> &other, <API key> * const q); private: Q_DECLARE_PUBLIC(<API key>) }; } // namespace PinpointEmail } // namespace QtAws #endif
<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AlterUsersTable2 extends Migration { /** * Run the migrations. * * Here, we are adding a new column to the users table called "age_range" * * They types of values we store in here will be: * - under_18 * - 18_24 * - etc. * * @return void */ public function up() { Schema::table('users', function (Blueprint $table) { $table->string('age_range')->nullable(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('users', function (Blueprint $table) { $table->dropColumn(['age_range']); }); } }
<h3>Lucky Guess? Or Calculated Risk?</h3> <h4>(λ)</h4> <p>From the example on the previous page, it looks like our game will need at least 3 different kinds of expressions:<code>guess</code>, <code>smaller</code>, and <code>bigger</code>.</p> <p>For the expressions to do what we want, we need to define the functions behind them.</p> <p>Before we do that, let's think about the strategy behind this simple game. The basic steps are: <ul> <li><span>set the upper and lower limits of the player's number</span></li> <li><span>guess a number halfway between the upper and lower limits</span></li> <li><span>lower the upper limit if the player says the number is smaller</span></li> <li><span>raise the lower limit if the player says the number is bigger</span></li> </ul> </p> <p>I'll let you in on a secret: your program won't actually <em>guess</em> the number, it will <em>find</em> it using a simple and effective <font class="red">binary search</font> algorithm.</p> <p>The risk? There isn't one&#8230; seemed like a cool title.</p> <p>Now type: <code class="expr">(define lower 1)</code></p> <aside id="info"> <span><font class="red">binary search</font><br>divides a range of values into halves, and continues to narrow down the field of search until the unknown value is found. It is the classic example of a "divide and conquer" algorithm.</span> </aside>
package org.ocbc.utils; import org.json.JSONObject; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import java.util.HashMap; public class request { public static JSONObject get(String url, HashMap<String, String> headers) { BufferedReader in = null; StringBuffer response = null; try { URL obj = new URL(url); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); for (String key : headers.keySet()) { con.setRequestProperty(key, headers.get(key)); } in = new BufferedReader(new InputStreamReader(con.getInputStream())); response = new StringBuffer(); String inputLine; while ((inputLine = in.readLine()) != null) { response.append(inputLine); } in.close(); } catch(Exception exception) { System.out.println(exception); return null; } return new JSONObject(response.toString()); } }
#include <common.h> #include <memory.h> #include <types.h> #include <stdio.h> #if defined( HAVE_ERRNO_H ) #include <errno.h> #endif #if defined( HAVE_UNISTD_H ) #include <unistd.h> #endif #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include <stdlib.h> #endif #if !defined( WINAPI ) || defined( USE_CRT_FUNCTIONS ) #if defined( TIME_WITH_SYS_TIME ) #include <sys/time.h> #include <time.h> #elif defined( HAVE_SYS_TIME_H ) #include <sys/time.h> #else #include <time.h> #endif #endif #if defined( HAVE_LIBFUSE ) || defined( HAVE_LIBOSXFUSE ) #define FUSE_USE_VERSION 26 #if defined( HAVE_LIBFUSE ) #include <fuse.h> #elif defined( HAVE_LIBOSXFUSE ) #include <osxfuse/fuse.h> #endif #elif defined( HAVE_LIBDOKAN ) #include <dokan.h> #endif #include "bdeoutput.h" #include "bdetools_libbde.h" #include "bdetools_libcerror.h" #include "bdetools_libclocale.h" #include "bdetools_libcnotify.h" #include "bdetools_libcstring.h" #include "bdetools_libcsystem.h" #include "mount_handle.h" mount_handle_t *<API key> = NULL; int bdemount_abort = 0; /* Prints the executable usage information */ void usage_fprint( FILE *stream ) { if( stream == NULL ) { return; } fprintf( stream, "Use bdemount to mount a BitLocker Drive Encrypted (BDE) volume\n\n" ); fprintf( stream, "Usage: bdemount [ -k keys ] [ -o offset ] [ -p password ]\n" " [ -r password ] [ -s filename ] [ -X extended_options ]\n" " [ -hvV ] source mount_point\n\n" ); fprintf( stream, "\tsource: the source file or device\n" ); fprintf( stream, "\tmount_point: the directory to serve as mount point\n\n" ); fprintf( stream, "\t-h: shows this help\n" ); fprintf( stream, "\t-k: the full volume encryption key and tweak key\n" "\t formatted in base16 and separated by a : character\n" "\t e.g. FKEV:TWEAK\n" ); fprintf( stream, "\t-o: specify the volume offset in bytes\n" ); fprintf( stream, "\t-p: specify the password/passphrase\n" ); fprintf( stream, "\t-r: specify the recovery password\n" ); fprintf( stream, "\t-s: specify the file containing the startup key.\n" "\t typically this file has the extension .BEK\n" ); fprintf( stream, "\t-v: verbose output to stderr\n" "\t bdemount will remain running in the foreground\n" ); fprintf( stream, "\t-V: print version\n" ); fprintf( stream, "\t-X: extended options to pass to sub system\n" ); } /* Signal handler for bdemount */ void <API key>( libcsystem_signal_t signal <API key> ) { libcerror_error_t *error = NULL; static char *function = "<API key>"; <API key>( signal ) bdemount_abort = 1; if( <API key> != NULL ) { if( <API key>( <API key>, &error ) != 1 ) { libcnotify_printf( "%s: unable to signal mount handle to abort.\n", function ); <API key>( error ); <API key>( &error ); } } /* Force stdin to close otherwise any function reading it will remain blocked */ if( <API key>( 0 ) != 0 ) { libcnotify_printf( "%s: unable to close stdin.\n", function ); } } #if defined( HAVE_LIBFUSE ) || defined( HAVE_LIBOSXFUSE ) #if ( SIZEOF_OFF_T != 8 ) && ( SIZEOF_OFF_T != 4 ) #error Size of off_t not supported #endif static char *bdemount_fuse_path = "/bde1"; static size_t <API key> = 5; #if defined( HAVE_TIME ) time_t bdemount_timestamp = 0; #endif /* Opens a file * Returns 0 if successful or a negative errno value otherwise */ int bdemount_fuse_open( const char *path, struct fuse_file_info *file_info ) { libcerror_error_t *error = NULL; static char *function = "bdemount_fuse_open"; size_t path_length = 0; int result = 0; if( path == NULL ) { libcerror_error_set( &error, <API key>, <API key>, "%s: invalid path.", function ); result = -EINVAL; goto on_error; } if( file_info == NULL ) { libcerror_error_set( &error, <API key>, <API key>, "%s: invalid file info.", function ); result = -EINVAL; goto on_error; } path_length = <API key>( path ); if( ( path_length != <API key> ) || ( <API key>( path, bdemount_fuse_path, <API key> ) != 0 ) ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unsupported path.", function ); result = -ENOENT; goto on_error; } if( ( file_info->flags & 0x03 ) != O_RDONLY ) { libcerror_error_set( &error, <API key>, <API key>, "%s: write access currently not supported.", function ); result = -EACCES; goto on_error; } return( 0 ); on_error: if( error != NULL ) { <API key>( error ); <API key>( &error ); } return( result ); } /* Reads a buffer of data at the specified offset * Returns number of bytes read if successful or a negative errno value otherwise */ int bdemount_fuse_read( const char *path, char *buffer, size_t size, off_t offset, struct fuse_file_info *file_info ) { libcerror_error_t *error = NULL; static char *function = "bdemount_fuse_read"; size_t path_length = 0; ssize_t read_count = 0; int result = 0; if( path == NULL ) { libcerror_error_set( &error, <API key>, <API key>, "%s: invalid path.", function ); result = -EINVAL; goto on_error; } if( size > (size_t) INT_MAX ) { libcerror_error_set( &error, <API key>, <API key>, "%s: invalid size value exceeds maximum.", function ); result = -EINVAL; goto on_error; } if( file_info == NULL ) { libcerror_error_set( &error, <API key>, <API key>, "%s: invalid file info.", function ); result = -EINVAL; goto on_error; } path_length = <API key>( path ); if( ( path_length != <API key> ) || ( <API key>( path, bdemount_fuse_path, <API key> ) != 0 ) ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unsupported path.", function ); result = -ENOENT; goto on_error; } if( <API key>( <API key>, (off64_t) offset, SEEK_SET, &error ) == -1 ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unable to seek offset in mount handle.", function ); result = -EIO; goto on_error; } read_count = <API key>( <API key>, (uint8_t *) buffer, size, &error ); if( read_count == -1 ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unable to read from mount handle.", function ); result = -EIO; goto on_error; } return( (int) read_count ); on_error: if( error != NULL ) { <API key>( error ); <API key>( &error ); } return( result ); } /* Sets the values in a stat info structure * Returns 1 if successful or -1 on error */ int <API key>( struct stat *stat_info, uint64_t creation_time, uint64_t modification_time, uint64_t access_time, size64_t size, int number_of_sub_items, uint8_t use_mount_time, libcerror_error_t **error ) { static char *function = "<API key>"; if( stat_info == NULL ) { libcerror_error_set( error, <API key>, <API key>, "%s: invalid stat info.", function ); return( -1 ); } if( use_mount_time == 0 ) { /* TODO check size fo time_t if 64-bit allow for more precision */ if( creation_time != 0 ) { creation_time /= 10000000; if( creation_time < 11644473600UL ) { creation_time = 0; } else { creation_time -= 11644473600UL; } /* TODO check upper bound */ stat_info->st_ctime = (time_t) creation_time; } if( modification_time != 0 ) { modification_time /= 10000000; if( modification_time < 11644473600UL ) { modification_time = 0; } else { modification_time -= 11644473600UL; } /* TODO check upper bound */ stat_info->st_mtime = (time_t) modification_time; } if( access_time != 0 ) { access_time /= 10000000; if( access_time < 11644473600UL ) { access_time = 0; } else { access_time -= 11644473600UL; } /* TODO check upper bound */ stat_info->st_atime = (time_t) access_time; } } #if defined( HAVE_TIME ) else { if( bdemount_timestamp == 0 ) { if( time( &bdemount_timestamp ) == (time_t) -1 ) { bdemount_timestamp = 0; } } stat_info->st_atime = bdemount_timestamp; stat_info->st_mtime = bdemount_timestamp; stat_info->st_ctime = bdemount_timestamp; } #endif if( size != 0 ) { #if SIZEOF_OFF_T <= 4 if( size > (size64_t) UINT32_MAX ) #else if( size > (size64_t) INT64_MAX ) #endif { libcerror_error_set( error, <API key>, <API key>, "%s: invalid size value out of bounds.", function ); return( -1 ); } stat_info->st_size = (off_t) size; } if( number_of_sub_items > 0 ) { stat_info->st_mode = S_IFDIR | 0555; stat_info->st_nlink = 2; } else { stat_info->st_mode = S_IFREG | 0444; stat_info->st_nlink = 1; } #if defined( HAVE_GETEUID ) stat_info->st_uid = geteuid(); #endif #if defined( HAVE_GETEGID ) stat_info->st_gid = getegid(); #endif return( 1 ); } /* Fills a directory entry * Returns 1 if successful or -1 on error */ int <API key>( void *buffer, fuse_fill_dir_t filler, char *name, size_t name_size, struct stat *stat_info, mount_handle_t *mount_handle, uint8_t use_mount_time, libcerror_error_t **error ) { static char *function = "<API key>"; size64_t volume_size = 0; uint64_t creation_time = 0; int number_of_sub_items = 0; if( filler == NULL ) { libcerror_error_set( error, <API key>, <API key>, "%s: invalid filler.", function ); return( -1 ); } if( mount_handle == NULL ) { number_of_sub_items = 1; } else { if( <API key>( mount_handle, &creation_time, error ) != 1 ) { libcerror_error_set( error, <API key>, <API key>, "%s: unable to retrieve creation time.", function ); return( -1 ); } if( <API key>( mount_handle, &volume_size, error ) != 1 ) { libcerror_error_set( error, <API key>, <API key>, "%s: unable to retrieve volume size.", function ); return( -1 ); } } if( memory_set( stat_info, 0, sizeof( struct stat ) ) == NULL ) { libcerror_error_set( error, <API key>, <API key>, "%s: unable to clear stat info.", function ); return( -1 ); } if( <API key>( stat_info, creation_time, creation_time, creation_time, volume_size, number_of_sub_items, use_mount_time, error ) != 1 ) { libcerror_error_set( error, <API key>, <API key>, "%s: unable to set stat info.", function ); return( -1 ); } if( filler( buffer, name, stat_info, 0 ) == 1 ) { libcerror_error_set( error, <API key>, <API key>, "%s: unable to set directory entry.", function ); return( -1 ); } return( 1 ); } /* Reads a directory * Returns 0 if successful or a negative errno value otherwise */ int <API key>( const char *path, void *buffer, fuse_fill_dir_t filler, off_t offset <API key>, struct fuse_file_info *file_info <API key> ) { libcerror_error_t *error = NULL; struct stat *stat_info = NULL; static char *function = "<API key>"; size_t path_length = 0; int result = 0; <API key>( offset ) <API key>( file_info ) if( path == NULL ) { libcerror_error_set( &error, <API key>, <API key>, "%s: invalid path.", function ); result = -EINVAL; goto on_error; } path_length = <API key>( path ); if( ( path_length != 1 ) || ( path[ 0 ] != '/' ) ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unsupported path.", function ); result = -ENOENT; goto on_error; } stat_info = <API key>( struct stat ); if( stat_info == NULL ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unable to create stat info.", function ); result = errno; goto on_error; } if( <API key>( buffer, filler, ".", 2, stat_info, NULL, 1, &error ) != 1 ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unable to set directory entry.", function ); result = -EIO; goto on_error; } if( <API key>( buffer, filler, "..", 3, stat_info, NULL, 0, &error ) != 1 ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unable to set directory entry.", function ); result = -EIO; goto on_error; } if( <API key>( buffer, filler, &( bdemount_fuse_path[ 1 ] ), <API key> + 1, stat_info, <API key>, 0, &error ) != 1 ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unable to set directory entry.", function ); result = -EIO; goto on_error; } memory_free( stat_info ); return( 0 ); on_error: if( error != NULL ) { <API key>( error ); <API key>( &error ); } if( stat_info != NULL ) { memory_free( stat_info ); } return( result ); } /* Retrieves the file stat info * Returns 0 if successful or a negative errno value otherwise */ int <API key>( const char *path, struct stat *stat_info ) { libcerror_error_t *error = NULL; static char *function = "<API key>"; size64_t volume_size = 0; uint64_t creation_time = 0; size_t path_length = 0; int number_of_sub_items = 0; int result = -ENOENT; uint8_t use_mount_time = 0; if( path == NULL ) { libcerror_error_set( &error, <API key>, <API key>, "%s: invalid path.", function ); result = -EINVAL; goto on_error; } if( stat_info == NULL ) { libcerror_error_set( &error, <API key>, <API key>, "%s: invalid stat info.", function ); result = -EINVAL; goto on_error; } if( memory_set( stat_info, 0, sizeof( struct stat ) ) == NULL ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unable to clear stat info.", function ); result = errno; goto on_error; } path_length = <API key>( path ); if( path_length == 1 ) { if( path[ 0 ] == '/' ) { number_of_sub_items = 1; use_mount_time = 1; result = 0; } } else if( path_length == <API key> ) { if( <API key>( path, bdemount_fuse_path, <API key> ) == 0 ) { if( <API key>( <API key>, &creation_time, &error ) != 1 ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unable to retrieve creation time.", function ); result = -EIO; goto on_error; } if( <API key>( <API key>, &volume_size, &error ) != 1 ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unable to retrieve volume size.", function ); result = -EIO; goto on_error; } result = 0; } } if( result == 0 ) { if( <API key>( stat_info, creation_time, creation_time, creation_time, volume_size, number_of_sub_items, use_mount_time, &error ) != 1 ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unable to set stat info.", function ); result = -EIO; goto on_error; } } return( result ); on_error: if( error != NULL ) { <API key>( error ); <API key>( &error ); } return( result ); } /* Cleans up when fuse is done */ void <API key>( void *private_data <API key> ) { libcerror_error_t *error = NULL; static char *function = "<API key>"; <API key>( private_data ) if( <API key> != NULL ) { if( mount_handle_free( &<API key>, &error ) != 1 ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unable to free mount handle.", function ); goto on_error; } } return; on_error: if( error != NULL ) { <API key>( error ); <API key>( &error ); } return; } #elif defined( HAVE_LIBDOKAN ) static wchar_t *bdemount_dokan_path = L"\\BDE1"; static size_t <API key> = 5; /* Opens a file or directory * Returns 0 if successful or a negative error code otherwise */ int __stdcall <API key>( const wchar_t *path, DWORD desired_access, DWORD share_mode <API key>, DWORD <API key>, DWORD attribute_flags <API key>, DOKAN_FILE_INFO *file_info ) { libcerror_error_t *error = NULL; static char *function = "<API key>"; size_t path_length = 0; int result = 0; <API key>( share_mode ) <API key>( attribute_flags ) if( path == NULL ) { libcerror_error_set( &error, <API key>, <API key>, "%s: invalid path.", function ); result = -ERROR_BAD_ARGUMENTS; goto on_error; } if( ( desired_access & GENERIC_WRITE ) != 0 ) { return( -ERROR_WRITE_PROTECT ); } /* Ignore the share_mode */ if( <API key> == CREATE_NEW ) { return( -ERROR_FILE_EXISTS ); } else if( <API key> == CREATE_ALWAYS ) { return( -<API key> ); } else if( <API key> == OPEN_ALWAYS ) { return( -<API key> ); } else if( <API key> == TRUNCATE_EXISTING ) { return( -<API key> ); } else if( <API key> != OPEN_EXISTING ) { libcerror_error_set( &error, <API key>, <API key>, "%s: invalid creation disposition.", function ); result = -ERROR_BAD_ARGUMENTS; goto on_error; } if( file_info == NULL ) { libcerror_error_set( &error, <API key>, <API key>, "%s: invalid file info.", function ); result = -ERROR_BAD_ARGUMENTS; goto on_error; } path_length = <API key>( path ); if( path_length == 1 ) { if( path[ 0 ] != (wchar_t) '\\' ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unsupported path: %ls.", function, path ); result = -<API key>; goto on_error; } } else { if( ( path_length != <API key> ) || ( <API key>( path, bdemount_dokan_path, <API key> ) != 0 ) ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unsupported path: %ls.", function, path ); result = -<API key>; goto on_error; } } return( 0 ); on_error: if( error != NULL ) { <API key>( error ); <API key>( &error ); } return( result ); } /* Opens a directory * Returns 0 if successful or a negative error code otherwise */ int __stdcall <API key>( const wchar_t *path, DOKAN_FILE_INFO *file_info <API key> ) { libcerror_error_t *error = NULL; static char *function = "<API key>"; size_t path_length = 0; int result = 0; <API key>( file_info ) if( path == NULL ) { libcerror_error_set( &error, <API key>, <API key>, "%s: invalid path.", function ); result = -ERROR_BAD_ARGUMENTS; goto on_error; } path_length = <API key>( path ); if( ( path_length != 1 ) || ( path[ 0 ] != (wchar_t) '\\' ) ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unsupported path: %ls.", function, path ); result = -<API key>; goto on_error; } return( 0 ); on_error: if( error != NULL ) { <API key>( error ); <API key>( &error ); } return( result ); } /* Closes a file or direcotry * Returns 0 if successful or a negative error code otherwise */ int __stdcall <API key>( const wchar_t *path, DOKAN_FILE_INFO *file_info <API key> ) { libcerror_error_t *error = NULL; static char *function = "<API key>"; int result = 0; <API key>( file_info ) if( path == NULL ) { libcerror_error_set( &error, <API key>, <API key>, "%s: invalid path.", function ); result = -ERROR_BAD_ARGUMENTS; goto on_error; } return( 0 ); on_error: if( error != NULL ) { <API key>( error ); <API key>( &error ); } return( result ); } /* Reads a buffer of data at the specified offset * Returns 0 if successful or a negative error code otherwise */ int __stdcall <API key>( const wchar_t *path, void *buffer, DWORD <API key>, DWORD *<API key>, LONGLONG offset, DOKAN_FILE_INFO *file_info <API key> ) { libcerror_error_t *error = NULL; static char *function = "<API key>"; size_t path_length = 0; ssize_t read_count = 0; int result = 0; <API key>( file_info ) if( path == NULL ) { libcerror_error_set( &error, <API key>, <API key>, "%s: invalid path.", function ); result = -ERROR_BAD_ARGUMENTS; goto on_error; } if( <API key> > (DWORD) INT32_MAX ) { libcerror_error_set( &error, <API key>, <API key>, "%s: invalid number of bytes to read value exceeds maximum.", function ); result = -ERROR_BAD_ARGUMENTS; goto on_error; } if( <API key> == NULL ) { libcerror_error_set( &error, <API key>, <API key>, "%s: invalid number of bytes read.", function ); result = -ERROR_BAD_ARGUMENTS; goto on_error; } path_length = <API key>( path ); if( ( path_length != <API key> ) || ( <API key>( path, bdemount_dokan_path, <API key> ) != 0 ) ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unsupported path: %ls.", function, path ); result = -<API key>; goto on_error; } if( <API key>( <API key>, (off64_t) offset, SEEK_SET, &error ) == -1 ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unable to seek offset in mount handle.", function ); result = -<API key>; goto on_error; } read_count = <API key>( <API key>, (uint8_t *) buffer, (size_t) <API key>, &error ); if( read_count == -1 ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unable to read from mount handle.", function ); result = -ERROR_READ_FAULT; goto on_error; } if( read_count > (size_t) INT32_MAX ) { libcerror_error_set( &error, <API key>, <API key>, "%s: invalid read count value exceeds maximum.", function ); result = -ERROR_READ_FAULT; goto on_error; } /* Dokan does not require the read function to return ERROR_HANDLE_EOF */ *<API key> = (DWORD) read_count; return( 0 ); on_error: if( error != NULL ) { <API key>( error ); <API key>( &error ); } return( result ); } /* Sets the values in a find data structure * Returns 1 if successful or -1 on error */ int <API key>( WIN32_FIND_DATAW *find_data, uint64_t creation_time, uint64_t modification_time, uint64_t access_time, size64_t size, int number_of_sub_items, uint8_t use_mount_time, libcerror_error_t **error ) { static char *function = "<API key>"; if( find_data == NULL ) { libcerror_error_set( error, <API key>, <API key>, "%s: invalid find data.", function ); return( -1 ); } if( use_mount_time == 0 ) { if( creation_time != 0 ) { find_data->ftCreationTime.dwLowDateTime = (uint32_t) ( creation_time & <API key> ); find_data->ftCreationTime.dwHighDateTime = creation_time >> 32; } if( modification_time != 0 ) { find_data->ftLastWriteTime.dwLowDateTime = (uint32_t) ( modification_time & <API key> ); find_data->ftLastWriteTime.dwHighDateTime = modification_time >> 32; } if( access_time != 0 ) { find_data->ftLastAccessTime.dwLowDateTime = (uint32_t) ( access_time & <API key> ); find_data->ftLastAccessTime.dwHighDateTime = access_time >> 32; } } /* TODO implement else { } */ if( size > 0 ) { find_data->nFileSizeHigh = (DWORD) ( size >> 32 ); find_data->nFileSizeLow = (DWORD) ( size & 0xffffffffUL ); } find_data->dwFileAttributes = <API key>; if( number_of_sub_items > 0 ) { find_data->dwFileAttributes |= <API key>; } return( 1 ); } /* Fills a directory entry * Returns 1 if successful or -1 on error */ int <API key>( PFillFindData fill_find_data, DOKAN_FILE_INFO *file_info, wchar_t *name, size_t name_size, WIN32_FIND_DATAW *find_data, mount_handle_t *mount_handle, uint8_t use_mount_time, libcerror_error_t **error ) { static char *function = "<API key>"; size64_t volume_size = 0; uint64_t creation_time = 0; int number_of_sub_items = 0; if( fill_find_data == NULL ) { libcerror_error_set( error, <API key>, <API key>, "%s: invalid fill find data.", function ); return( -1 ); } if( name == NULL ) { libcerror_error_set( error, <API key>, <API key>, "%s: invalid name.", function ); return( -1 ); } if( name_size > (size_t) MAX_PATH ) { libcerror_error_set( error, <API key>, <API key>, "%s: invalid name size value out of bounds.", function ); return( -1 ); } if( mount_handle == NULL ) { number_of_sub_items = 1; } else { if( <API key>( mount_handle, &creation_time, error ) != 1 ) { libcerror_error_set( error, <API key>, <API key>, "%s: unable to retrieve creation time.", function ); return( -1 ); } if( <API key>( mount_handle, &volume_size, error ) != 1 ) { libcerror_error_set( error, <API key>, <API key>, "%s: unable to retrieve volume size.", function ); return( -1 ); } } if( memory_set( find_data, 0, sizeof( WIN32_FIND_DATAW ) ) == NULL ) { libcerror_error_set( error, <API key>, <API key>, "%s: unable to clear find data.", function ); return( -1 ); } if( <API key>( find_data->cFileName, name, name_size ) == NULL ) { libcerror_error_set( error, <API key>, <API key>, "%s: unable to copy filename.", function ); return( -1 ); } if( name_size <= (size_t) 14 ) { if( <API key>( find_data->cAlternateFileName, name, name_size ) == NULL ) { libcerror_error_set( error, <API key>, <API key>, "%s: unable to copy alternate filename.", function ); return( -1 ); } } if( <API key>( find_data, creation_time, creation_time, creation_time, volume_size, number_of_sub_items, use_mount_time, error ) != 1 ) { libcerror_error_set( error, <API key>, <API key>, "%s: unable to set find data.", function ); return( -1 ); } if( fill_find_data( find_data, file_info ) != 0 ) { libcerror_error_set( error, <API key>, <API key>, "%s: unable to set directory entry.", function ); return( -1 ); } return( 1 ); } /* Reads a directory * Returns 0 if successful or a negative error code otherwise */ int __stdcall <API key>( const wchar_t *path, PFillFindData fill_find_data, DOKAN_FILE_INFO *file_info ) { WIN32_FIND_DATAW find_data; libcerror_error_t *error = NULL; static char *function = "<API key>"; size_t path_length = 0; int result = 0; if( path == NULL ) { libcerror_error_set( &error, <API key>, <API key>, "%s: invalid path.", function ); result = -ERROR_BAD_ARGUMENTS; goto on_error; } path_length = <API key>( path ); if( ( path_length != 1 ) || ( path[ 0 ] != (wchar_t) '\\' ) ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unsupported path: %ls.", function, path ); result = -<API key>; goto on_error; } if( <API key>( fill_find_data, file_info, L".", 2, &find_data, NULL, 1, &error ) != 1 ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unable to set find data.", function ); result = -ERROR_GEN_FAILURE; goto on_error; } if( <API key>( fill_find_data, file_info, L"..", 3, &find_data, NULL, 0, &error ) != 1 ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unable to set find data.", function ); result = -ERROR_GEN_FAILURE; goto on_error; } if( <API key>( fill_find_data, file_info, &( bdemount_dokan_path[ 1 ] ), <API key>, &find_data, <API key>, 0, &error ) != 1 ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unable to set find data.", function ); result = -ERROR_GEN_FAILURE; goto on_error; } return( 0 ); on_error: if( error != NULL ) { <API key>( error ); <API key>( &error ); } return( result ); } /* Sets the values in a file information structure * Returns 1 if successful or -1 on error */ int <API key>( <API key> *file_information, uint64_t creation_time, uint64_t modification_time, uint64_t access_time, size64_t size, int number_of_sub_items, uint8_t use_mount_time, libcerror_error_t **error ) { static char *function = "<API key>"; if( file_information == NULL ) { libcerror_error_set( error, <API key>, <API key>, "%s: invalid file information.", function ); return( -1 ); } if( use_mount_time == 0 ) { if( creation_time != 0 ) { file_information->ftCreationTime.dwLowDateTime = (uint32_t) ( creation_time & <API key> ); file_information->ftCreationTime.dwHighDateTime = creation_time >> 32; } if( modification_time != 0 ) { file_information->ftLastWriteTime.dwLowDateTime = (uint32_t) ( modification_time & <API key> ); file_information->ftLastWriteTime.dwHighDateTime = modification_time >> 32; } if( access_time != 0 ) { file_information->ftLastAccessTime.dwLowDateTime = (uint32_t) ( access_time & <API key> ); file_information->ftLastAccessTime.dwHighDateTime = access_time >> 32; } } /* TODO implement else { } */ if( size > 0 ) { file_information->nFileSizeHigh = (DWORD) ( size >> 32 ); file_information->nFileSizeLow = (DWORD) ( size & 0xffffffffUL ); } file_information->dwFileAttributes = <API key>; if( number_of_sub_items > 0 ) { file_information->dwFileAttributes |= <API key>; } return( 1 ); } /* Retrieves the file information * Returns 0 if successful or a negative error code otherwise */ int __stdcall <API key>( const wchar_t *path, <API key> *file_information, DOKAN_FILE_INFO *file_info ) { libcerror_error_t *error = NULL; static char *function = "<API key>"; size64_t volume_size = 0; uint64_t creation_time = 0; size_t path_length = 0; int number_of_sub_items = 0; int result = 0; uint8_t use_mount_time = 0; if( path == NULL ) { libcerror_error_set( &error, <API key>, <API key>, "%s: invalid path.", function ); result = -ERROR_BAD_ARGUMENTS; goto on_error; } if( file_info == NULL ) { libcerror_error_set( &error, <API key>, <API key>, "%s: invalid file info.", function ); result = -ERROR_BAD_ARGUMENTS; goto on_error; } path_length = <API key>( path ); if( path_length == 1 ) { if( path[ 0 ] != (wchar_t) '\\' ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unsupported path: %ls.", function, path ); result = -<API key>; goto on_error; } number_of_sub_items = 1; use_mount_time = 1; } else { if( ( path_length != <API key> ) || ( <API key>( path, bdemount_dokan_path, <API key> ) != 0 ) ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unsupported path: %ls.", function, path ); result = -<API key>; goto on_error; } if( <API key>( <API key>, &creation_time, &error ) != 1 ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unable to retrieve creation time.", function ); result = -ERROR_GEN_FAILURE; goto on_error; } if( <API key>( <API key>, &volume_size, &error ) != 1 ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unable to retrieve volume size.", function ); result = -ERROR_GEN_FAILURE; goto on_error; } } if( <API key>( file_information, creation_time, creation_time, creation_time, volume_size, number_of_sub_items, use_mount_time, &error ) != 1 ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unable to set file info.", function ); result = -ERROR_GEN_FAILURE; goto on_error; } return( 0 ); on_error: if( error != NULL ) { <API key>( error ); <API key>( &error ); } return( result ); } /* Retrieves the volume information * Returns 0 if successful or a negative error code otherwise */ int __stdcall <API key>( wchar_t *volume_name, DWORD volume_name_size, DWORD *<API key>, DWORD *<API key>, DWORD *file_system_flags, wchar_t *file_system_name, DWORD <API key>, DOKAN_FILE_INFO *file_info <API key> ) { libcerror_error_t *error = NULL; static char *function = "<API key>"; int result = 0; <API key>( file_info ) if( ( volume_name != NULL ) && ( volume_name_size > (DWORD) ( sizeof( wchar_t ) * 4 ) ) ) { /* Using wcsncpy seems to cause strange behavior here */ if( memory_copy( volume_name, L"BDE", sizeof( wchar_t ) * 4 ) == NULL ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unable to copy volume name.", function ); result = -ERROR_GEN_FAILURE; goto on_error; } } if( <API key> != NULL ) { /* If this value contains 0 it can crash the system is this an issue in Dokan? */ *<API key> = 0x19831116; } if( <API key> != NULL ) { *<API key> = 256; } if( file_system_flags != NULL ) { *file_system_flags = <API key> | <API key> | <API key> | <API key>; } if( ( file_system_name != NULL ) && ( <API key> > (DWORD) ( sizeof( wchar_t ) * 6 ) ) ) { /* Using wcsncpy seems to cause strange behavior here */ if( memory_copy( file_system_name, L"Dokan", sizeof( wchar_t ) * 6 ) == NULL ) { libcerror_error_set( &error, <API key>, <API key>, "%s: unable to copy file system name.", function ); result = -ERROR_GEN_FAILURE; goto on_error; } } return( 0 ); on_error: if( error != NULL ) { <API key>( error ); <API key>( &error ); } return( result ); } /* Unmount the image * Returns 0 if successful or a negative error code otherwise */ int __stdcall <API key>( DOKAN_FILE_INFO *file_info <API key> ) { static char *function = "<API key>"; <API key>( file_info ) return( 0 ); } #endif /* The main program */ #if defined( <API key> ) int wmain( int argc, wchar_t * const argv[] ) #else int main( int argc, char * const argv[] ) #endif { libbde_error_t *error = NULL; <API key> *mount_point = NULL; <API key> *<API key> = NULL; <API key> *option_keys = NULL; <API key> *option_password = NULL; <API key> *<API key> = NULL; <API key> *<API key> = NULL; <API key> *<API key> = NULL; <API key> *source = NULL; char *program = "bdemount"; <API key> option = 0; int result = 0; int verbose = 0; #if defined( HAVE_LIBFUSE ) || defined( HAVE_LIBOSXFUSE ) struct fuse_operations <API key>; struct fuse_args <API key> = FUSE_ARGS_INIT(0, NULL); struct fuse_chan *<API key> = NULL; struct fuse *<API key> = NULL; #elif defined( HAVE_LIBDOKAN ) DOKAN_OPERATIONS <API key>; DOKAN_OPTIONS <API key>; #endif <API key>( stderr, NULL ); <API key>( 1 ); if( <API key>( "bdetools", &error ) != 1 ) { fprintf( stderr, "Unable to initialize locale values.\n" ); goto on_error; } if( <API key>( _IONBF, &error ) != 1 ) { fprintf( stderr, "Unable to initialize system values.\n" ); goto on_error; } <API key>( stdout, program ); while( ( option = libcsystem_getopt( argc, argv, <API key>( "hk:o:p:r:s:vVX:" ) ) ) != (<API key>) -1 ) { switch( option ) { case (<API key>) '?': default: fprintf( stderr, "Invalid argument: %" <API key> "\n", argv[ optind - 1 ] ); usage_fprint( stdout ); return( EXIT_FAILURE ); case (<API key>) 'h': usage_fprint( stdout ); return( EXIT_SUCCESS ); case (<API key>) 'k': option_keys = optarg; break; case (<API key>) 'o': <API key> = optarg; break; case (<API key>) 'p': option_password = optarg; break; case (<API key>) 'r': <API key> = optarg; break; case (<API key>) 's': <API key> = optarg; break; case (<API key>) 'v': verbose = 1; break; case (<API key>) 'V': <API key>( stdout ); return( EXIT_SUCCESS ); case (<API key>) 'X': <API key> = optarg; break; } } if( optind == argc ) { fprintf( stderr, "Missing source file or device.\n" ); usage_fprint( stdout ); return( EXIT_FAILURE ); } source = argv[ optind++ ]; if( optind == argc ) { fprintf( stderr, "Missing mount point.\n" ); usage_fprint( stdout ); return( EXIT_FAILURE ); } mount_point = argv[ optind ]; <API key>( verbose ); <API key>( stderr, NULL ); <API key>( verbose ); if( <API key>( &<API key>, &error ) != 1 ) { fprintf( stderr, "Unable to initialize mount handle.\n" ); goto on_error; } if( option_keys != NULL ) { if( <API key>( <API key>, option_keys, &error ) != 1 ) { fprintf( stderr, "Unable to set keys.\n" ); goto on_error; } } if( option_password != NULL ) { if( <API key>( <API key>, option_password, &error ) != 1 ) { fprintf( stderr, "Unable to set password.\n" ); goto on_error; } } if( <API key> != NULL ) { if( <API key>( <API key>, <API key>, &error ) != 1 ) { fprintf( stderr, "Unable to set recovery password.\n" ); goto on_error; } } if( <API key> != NULL ) { if( <API key>( <API key>, <API key>, &error ) != 1 ) { fprintf( stderr, "Unable to read startup key.\n" ); goto on_error; } } if( <API key> != NULL ) { if( <API key>( <API key>, <API key>, &error ) != 1 ) { fprintf( stderr, "Unable to set volume offset.\n" ); goto on_error; } } result = <API key>( <API key>, source, &error ); if( result != 1 ) { fprintf( stderr, "Unable to open: %" <API key> ".\n", source ); goto on_error; } result = <API key>( <API key>, &error ); if( result != 0 ) { fprintf( stderr, "Unable to unlock volume.\n" ); goto on_error; } #if defined( HAVE_LIBFUSE ) || defined( HAVE_LIBOSXFUSE ) if( memory_set( &<API key>, 0, sizeof( struct fuse_operations ) ) == NULL ) { fprintf( stderr, "Unable to clear fuse operations.\n" ); goto on_error; } if( <API key> != NULL ) { /* This argument is required but ignored */ if( fuse_opt_add_arg( &<API key>, "" ) != 0 ) { fprintf( stderr, "Unable add fuse arguments.\n" ); goto on_error; } if( fuse_opt_add_arg( &<API key>, "-o" ) != 0 ) { fprintf( stderr, "Unable add fuse arguments.\n" ); goto on_error; } if( fuse_opt_add_arg( &<API key>, <API key> ) != 0 ) { fprintf( stderr, "Unable add fuse arguments.\n" ); goto on_error; } } <API key>.open = &bdemount_fuse_open; <API key>.read = &bdemount_fuse_read; <API key>.readdir = &<API key>; <API key>.getattr = &<API key>; <API key>.destroy = &<API key>; <API key> = fuse_mount( mount_point, &<API key> ); if( <API key> == NULL ) { fprintf( stderr, "Unable to create fuse channel.\n" ); goto on_error; } <API key> = fuse_new( <API key>, &<API key>, &<API key>, sizeof( struct fuse_operations ), <API key> ); if( <API key> == NULL ) { fprintf( stderr, "Unable to create fuse handle.\n" ); goto on_error; } if( verbose == 0 ) { if( fuse_daemonize( 0 ) != 0 ) { fprintf( stderr, "Unable to daemonize fuse.\n" ); goto on_error; } } result = fuse_loop( <API key> ); if( result != 0 ) { fprintf( stderr, "Unable to run fuse loop.\n" ); goto on_error; } fuse_destroy( <API key> ); fuse_opt_free_args( &<API key> ); return( EXIT_SUCCESS ); #elif defined( HAVE_LIBDOKAN ) if( memory_set( &<API key>, 0, sizeof( DOKAN_OPERATIONS ) ) == NULL ) { fprintf( stderr, "Unable to clear dokan operations.\n" ); goto on_error; } if( memory_set( &<API key>, 0, sizeof( DOKAN_OPTIONS ) ) == NULL ) { fprintf( stderr, "Unable to clear dokan options.\n" ); goto on_error; } <API key>.Version = 600; <API key>.ThreadCount = 0; <API key>.MountPoint = mount_point; if( verbose != 0 ) { <API key>.Options |= DOKAN_OPTION_STDERR; #if defined( HAVE_DEBUG_OUTPUT ) <API key>.Options |= DOKAN_OPTION_DEBUG; #endif } /* This will only affect the drive properties <API key>.Options |= <API key>; */ <API key>.Options |= <API key>; <API key>.CreateFile = &<API key>; <API key>.OpenDirectory = &<API key>; <API key>.CreateDirectory = NULL; <API key>.Cleanup = NULL; <API key>.CloseFile = &<API key>; <API key>.ReadFile = &<API key>; <API key>.WriteFile = NULL; <API key>.FlushFileBuffers = NULL; <API key>.GetFileInformation = &<API key>; <API key>.FindFiles = &<API key>; <API key>.<API key> = NULL; <API key>.SetFileAttributes = NULL; <API key>.SetFileTime = NULL; <API key>.DeleteFile = NULL; <API key>.DeleteDirectory = NULL; <API key>.MoveFile = NULL; <API key>.SetEndOfFile = NULL; <API key>.SetAllocationSize = NULL; <API key>.LockFile = NULL; <API key>.UnlockFile = NULL; <API key>.GetFileSecurity = NULL; <API key>.SetFileSecurity = NULL; <API key>.GetDiskFreeSpace = NULL; <API key>.<API key> = &<API key>; <API key>.Unmount = &<API key>; result = DokanMain( &<API key>, &<API key> ); switch( result ) { case DOKAN_SUCCESS: break; case DOKAN_ERROR: fprintf( stderr, "Unable to run dokan main: generic error\n" ); break; case <API key>: fprintf( stderr, "Unable to run dokan main: bad drive letter\n" ); break; case <API key>: fprintf( stderr, "Unable to run dokan main: unable to load driver\n" ); break; case DOKAN_START_ERROR: fprintf( stderr, "Unable to run dokan main: driver error\n" ); break; case DOKAN_MOUNT_ERROR: fprintf( stderr, "Unable to run dokan main: unable to assign drive letter\n" ); break; case <API key>: fprintf( stderr, "Unable to run dokan main: mount point error\n" ); break; default: fprintf( stderr, "Unable to run dokan main: unknown error: %d\n", result ); break; } return( EXIT_SUCCESS ); #else fprintf( stderr, "No sub system to mount BDE volume.\n" ); return( EXIT_FAILURE ); #endif on_error: if( error != NULL ) { <API key>( error ); <API key>( &error ); } #if defined( HAVE_LIBFUSE ) || defined( HAVE_LIBOSXFUSE ) if( <API key> != NULL ) { fuse_destroy( <API key> ); } fuse_opt_free_args( &<API key> ); #endif if( <API key> != NULL ) { mount_handle_free( &<API key>, NULL ); } return( EXIT_FAILURE ); }
#ifndef MASKEDITEM_H #define MASKEDITEM_H #include "maskeffect.h" #include <QDeclarativeItem> class MaskEffect; class <API key>; class MaskedItem : public QDeclarativeItem { Q_OBJECT Q_PROPERTY(<API key> *mask READ mask WRITE setMask NOTIFY maskChanged) public: MaskedItem(QDeclarativeItem *parent = 0); virtual ~MaskedItem(); <API key> *mask() const; void setMask(<API key> *component); signals: void maskChanged(); private: MaskEffect *m_effect; <API key> *m_maskComponent; }; #endif // MASKEDITEM_H
#if HAVE_CONFIG_H # include <config.h> #endif #include <stdio.h> #include <string.h> #include <errno.h> #include <wget.h> #include "private.h" static int _stream_callback(<API key> *resp G_GNUC_WGET_UNUSED, void *user_data, const char *data, size_t length) { FILE *stream = (FILE *) user_data; size_t nbytes = fwrite(data, 1, length, stream); if (nbytes != length) { error_printf(_("Failed to write %zu bytes of data (%d)\n"), length, errno); if (feof(stream)) return -1; } return 0; } static int _fd_callback(<API key> *resp G_GNUC_WGET_UNUSED, void *user_data, const char *data, size_t length) { int fd = *(int *) user_data; ssize_t nbytes = write(fd, data, length); if (nbytes == -1 || (size_t) nbytes != length) error_printf(_("Failed to write %zu bytes of data (%d)\n"), length, errno); return 0; } <API key> *wget_http_get(int first_key, ...) { wget_vector_t *headers = wget_vector_create(8, 8, NULL); wget_iri_t *uri = NULL; <API key> *conn = NULL, **connp = NULL; wget_http_request_t *req; <API key> *resp = NULL; wget_vector_t *challenges = NULL; wget_cookie_db_t *cookie_db = NULL; FILE *saveas_stream = NULL; <API key> saveas_callback = NULL; int saveas_fd = -1; <API key> header_callback = NULL; va_list args; const char *url = NULL, *url_encoding = NULL, *scheme = "GET"; const char *http_username = NULL, *http_password = NULL; const char *saveas_name = NULL; int key, it, max_redirections = 5, redirection_level = 0; size_t bodylen = 0; const void *body = NULL; void *header_user_data = NULL, *body_user_data = NULL; struct { unsigned int cookies_enabled : 1, keep_header : 1, free_uri : 1; } bits = { .cookies_enabled = !!wget_global_get_int(<API key>) }; va_start(args, first_key); for (key = first_key; key; key = va_arg(args, int)) { switch (key) { case WGET_HTTP_URL: url = va_arg(args, const char *); break; case WGET_HTTP_URI: uri = va_arg(args, wget_iri_t *); break; case <API key>: url_encoding = va_arg(args, const char *); break; case <API key>: { <API key> param = { .name = va_arg(args, const char *), .value = va_arg(args, const char *) }; wget_vector_add(headers, &param, sizeof(param)); break; } case <API key>: connp = va_arg(args, <API key> **); if (connp) conn = *connp; break; case <API key>: bits.keep_header = va_arg(args, int); break; case <API key>: max_redirections = va_arg(args, int); break; case <API key>: saveas_name = va_arg(args, const char *); break; case <API key>: saveas_stream = va_arg(args, FILE *); break; case <API key>: saveas_callback = va_arg(args, <API key>); body_user_data = va_arg(args, void *); break; case <API key>: saveas_fd = va_arg(args, int); break; case <API key>: header_callback = va_arg(args, <API key>); header_user_data = va_arg(args, void *); break; case WGET_HTTP_SCHEME: scheme = va_arg(args, const char *); break; case WGET_HTTP_BODY: body = va_arg(args, const void *); bodylen = va_arg(args, size_t); break; default: error_printf(_("Unknown option %d\n"), key); goto out; } } va_end(args); if (url && !uri) { uri = wget_iri_parse(url, url_encoding); if (!uri) { error_printf (_("Error parsing URL\n")); goto out; } bits.free_uri = 1; } if (!uri) { error_printf(_("Missing URL/URI\n")); goto out; } if (bits.cookies_enabled) cookie_db = (wget_cookie_db_t *)wget_global_get_ptr(WGET_COOKIE_DB); while (uri && redirection_level <= max_redirections) { // create a HTTP/1.1 GET request. // the only default header is 'Host: domain' (taken from uri) req = <API key>(uri, scheme); // add HTTP headers for (it = 0; it < wget_vector_size(headers); it++) { <API key>(req, wget_vector_get(headers, it)); } if (challenges) { // There might be more than one challenge, we could select the most secure one. // For simplicity and testing we just take the first for now. // the following adds an Authorization: HTTP header <API key>(req, wget_vector_get(challenges, 0), http_username, http_password); <API key>(&challenges); } // use keep-alive if you want to send more requests on the same connection // http_add_header(req, "Connection", "keep-alive"); // enrich the HTTP request with the uri-related cookies we have if (cookie_db) { const char *cookie_string; if ((cookie_string = <API key>(cookie_db, uri))) { <API key>(req, "Cookie", cookie_string); xfree(cookie_string); } } if (connp) { <API key>(req, "Connection", "keepalive"); } // open/reopen/reuse HTTP/HTTPS connection if (conn && !wget_strcmp(conn->esc_host, uri->host) && conn->scheme == uri->scheme && !wget_strcmp(conn->port, uri->resolv_port)) { debug_printf("reuse connection %s\n", conn->esc_host); } else { if (conn) { debug_printf("close connection %s\n", conn->esc_host); wget_http_close(&conn); } if (wget_http_open(&conn, uri) == WGET_E_SUCCESS) debug_printf("opened connection %s\n", conn->esc_host); } if (conn) { int rc; if (body && bodylen) <API key>(req, NULL, wget_memdup(body, bodylen), bodylen); rc = <API key>(conn, req); if (rc == 0) { <API key>(req, header_callback, header_user_data); <API key>(req, <API key>, 1); if (saveas_name) { FILE *fp; if ((fp = fopen(saveas_name, "w"))) { <API key>(req, _stream_callback, fp); resp = <API key>(conn); fclose(fp); } else debug_printf("Failed to open '%s' for writing\n", saveas_name); } else if (saveas_stream) { <API key>(req, _stream_callback, saveas_stream); resp = <API key>(conn); } else if (saveas_callback) { <API key>(req, saveas_callback, body_user_data); resp = <API key>(conn); } else if (saveas_fd != -1) { <API key>(req, _fd_callback, &saveas_fd); resp = <API key>(conn); } else resp = <API key>(conn); } } <API key>(&req); if (!resp) goto out; // server doesn't support or want keep-alive if (!resp->keep_alive) wget_http_close(&conn); if (cookie_db) { // check and normalization of received cookies <API key>(uri, resp->cookies); // put cookies into cookie-store (also known as cookie-jar) <API key>(cookie_db, resp->cookies); } if (resp->code == 401 && !challenges) { // Unauthorized if ((challenges = resp->challenges)) { resp->challenges = NULL; <API key>(&resp); if (redirection_level == 0 && max_redirections) { redirection_level = max_redirections; // just try one more time with authentication continue; // try again with credentials } } break; } // 304 Not Modified if (resp->code / 100 == 2 || resp->code / 100 >= 4 || resp->code == 304) break; // final response if (resp->location) { char uri_sbuf[1024]; wget_buffer_t uri_buf; // if relative location, convert to absolute wget_buffer_init(&uri_buf, uri_sbuf, sizeof(uri_sbuf)); <API key>(uri, resp->location, strlen(resp->location), &uri_buf); if (bits.free_uri) wget_iri_free(&uri); uri = wget_iri_parse(uri_buf.data, NULL); bits.free_uri = 1; wget_buffer_deinit(&uri_buf); redirection_level++; continue; } break; } out: if (connp) { *connp = conn; } else { wget_http_close(&conn); } <API key>(&challenges); // <API key>(headers); wget_vector_free(&headers); if (bits.free_uri) wget_iri_free(&uri); return resp; }
<?php $GLOBALS['TL_LANG']['tl_linkslist_list']['title_legend'] = 'Titel'; $GLOBALS['TL_LANG']['tl_linkslist_list']['config_legend'] = 'Einstellungen'; $GLOBALS['TL_LANG']['tl_linkslist_list']['name'][0] = 'Titel'; $GLOBALS['TL_LANG']['tl_linkslist_list']['name'][1] = 'Geben Sie hier den Linklist Titel ein.'; $GLOBALS['TL_LANG']['tl_linkslist_list']['new'][0] = 'Neue Linkliste'; $GLOBALS['TL_LANG']['tl_linkslist_list']['new'][1] = 'Eine neue Linkliste anlegen'; $GLOBALS['TL_LANG']['tl_linkslist_list']['edit'][0] = 'Linkliste bearbeiten'; $GLOBALS['TL_LANG']['tl_linkslist_list']['edit'][1] = 'Linkliste ID %s bearbeiten'; $GLOBALS['TL_LANG']['tl_linkslist_list']['delete'][0] = 'Linkliste löschen'; $GLOBALS['TL_LANG']['tl_linkslist_list']['delete'][1] = 'Linkliste ID %s löchen'; $GLOBALS['TL_LANG']['tl_linkslist_list']['show'][0] = 'Linklistendetails'; $GLOBALS['TL_LANG']['tl_linkslist_list']['show'][1] = 'Details der Linkliste ID %s anzeigen'; $GLOBALS['TL_LANG']['tl_linkslist_list']['target'][0] = 'Links in neuem Fenster öffnen'; $GLOBALS['TL_LANG']['tl_linkslist_list']['target'][1] = 'Bitte wählen sie aus, ob die Links in einem neuen Fenster geöffnet werden sollen (target="_blank").'; ?>
namespace MoCap.Manager { class Dispatcher : IComMsg { } }
using System; using System.IO; using System.Net; using System.Net.Sockets; using DnDns.Records; using DnDns.Enums; namespace DnDns.Query { <summary> Summary description for DnsQueryResponse. </summary> public class DnsQueryResponse : DnsQueryBase { #region Fields private DnsQueryRequest _queryRequest = new DnsQueryRequest(); private IDnsRecord[] _answers; private IDnsRecord[] _<API key>; private IDnsRecord[] _additionalRecords; private int _bytesReceived = 0; #endregion Fields #region properties public DnsQueryRequest QueryRequest { get { return _queryRequest; } } public IDnsRecord[] Answers { get { return _answers; } } public IDnsRecord[] <API key> { get { return _<API key>; } } public IDnsRecord[] AdditionalRecords { get { return _additionalRecords; } } public int BytesReceived { get { return _bytesReceived; } } #endregion <summary> </summary> public DnsQueryResponse() { } private DnsQueryRequest ParseQuery(ref MemoryStream ms) { DnsQueryRequest queryRequest = new DnsQueryRequest(); // Read name queryRequest.Name = DnsRecordBase.ParseName(ref ms); return queryRequest; } internal void ParseResponse(byte[] recvBytes, ProtocolType protocol) { MemoryStream ms = new MemoryStream(recvBytes); byte[] flagBytes = new byte[2]; byte[] transactionId = new byte[2]; byte[] questions = new byte[2]; byte[] answerRRs = new byte[2]; byte[] authorityRRs = new byte[2]; byte[] additionalRRs = new byte[2]; byte[] nsType = new byte[2]; byte[] nsClass = new byte[2]; this._bytesReceived = recvBytes.Length; // Parse DNS Response ms.Read(transactionId, 0, 2); ms.Read(flagBytes, 0, 2); ms.Read(questions, 0, 2); ms.Read(answerRRs, 0, 2); ms.Read(authorityRRs, 0, 2); ms.Read(additionalRRs ,0, 2); // Parse Header _transactionId = (ushort)IPAddress.NetworkToHostOrder((short)BitConverter.ToUInt16(transactionId, 0)); _flags = (ushort)IPAddress.NetworkToHostOrder((short)BitConverter.ToUInt16(flagBytes, 0)); _queryResponse = (QueryResponse)(_flags & (ushort)FlagMasks.QueryResponseMask); _opCode = (OpCode)(_flags & (ushort)FlagMasks.OpCodeMask); _nsFlags = (NsFlags)(_flags & (ushort)FlagMasks.NsFlagMask); _rCode = (RCode)(_flags & (ushort)FlagMasks.RCodeMask); // Parse Questions Section _questions = (ushort)IPAddress.NetworkToHostOrder((short)BitConverter.ToUInt16(questions, 0)); _answerRRs = (ushort)IPAddress.NetworkToHostOrder(BitConverter.ToInt16(answerRRs, 0)); _authorityRRs = (ushort)IPAddress.NetworkToHostOrder(BitConverter.ToInt16(authorityRRs, 0)); _additionalRRs = (ushort)IPAddress.NetworkToHostOrder(BitConverter.ToInt16(additionalRRs, 0)); _additionalRecords = new DnsRecordBase[_additionalRRs]; _answers = new DnsRecordBase[_answerRRs]; _<API key> = new DnsRecordBase[_authorityRRs]; // Parse Queries _queryRequest = this.ParseQuery(ref ms); // Read dnsType ms.Read(nsType, 0, 2); // Read dnsClass ms.Read(nsClass, 0, 2); _nsType = (NsType)IPAddress.NetworkToHostOrder(BitConverter.ToInt16(nsType, 0)); _nsClass = (NsClass)IPAddress.NetworkToHostOrder(BitConverter.ToInt16(nsClass, 0)); // Read in Answer Blocks for (int i=0; i < _answerRRs; i++) { _answers[i] = RecordFactory.Create(ref ms); } // Parse Authority Records for (int i=0; i < _authorityRRs; i++) { _<API key>[i] = RecordFactory.Create(ref ms); } // Parse Additional Records for (int i=0; i < _additionalRRs; i++) { _additionalRecords[i] = RecordFactory.Create(ref ms); } } } }
<?php namespace <API key>\DcGeneral\Contao\View\Contao2BackendView\Event; /** * Class <API key>. * * This event gets issued when the top level buttons in the listing view are being retrieved. * * These buttons include, but are not limited to, the "back" button and the "edit multiple" button. */ class <API key> extends BaseButtonEvent { public const NAME = 'dc-general.view.contao2backend.get-global-button'; /** * The hotkey for the button. * * @var string */ protected $accessKey; /** * The css class to use. * * @var string */ protected $class; /** * The href to use. * * @var string */ protected $href; /** * Set the hotkey for the button. * * @param string $accessKey The hotkey for the button. * * @return $this */ public function setAccessKey($accessKey) { $this->accessKey = $accessKey; return $this; } /** * Get the hotkey for the button. * * @return string */ public function getAccessKey() { return $this->accessKey; } /** * Set the css class for this button. * * @param string $class The css class. * * @return $this */ public function setClass($class) { $this->class = $class; return $this; } /** * Get the css class for this button. * * @return string */ public function getClass() { return $this->class; } /** * Set the href for this button. * * @param string $href The href. * * @return $this */ public function setHref($href) { $this->href = $href; return $this; } /** * Get the href for this button. * * @return string */ public function getHref() { return $this->href; } }
#include "gtest/gtest.h" #include "oapHostMemoryApi.h" class OapMemoryApiTests : public testing::Test { public: virtual void SetUp() {} virtual void TearDown() {} }; TEST_F(OapMemoryApiTests, Test_1) { oap::Memory memory = oap::host::NewMemory ({1, 1}); oap::Memory memory1 = oap::host::ReuseMemory (memory); oap::Memory memory2 = oap::host::ReuseMemory (memory); oap::host::DeleteMemory (memory); oap::host::DeleteMemory (memory1); oap::host::DeleteMemory (memory2); } TEST_F(OapMemoryApiTests, Test_2) { oap::Memory memory = oap::host::NewMemoryWithValues ({2, 1}, 2.f); oap::host::DeleteMemory (memory); }
package org.openbase.bco.device.openhab.communication; import com.google.gson.*; import org.eclipse.smarthome.core.internal.service.<API key>; import org.eclipse.smarthome.core.internal.types.<API key>; import org.eclipse.smarthome.core.types.CommandDescription; import org.eclipse.smarthome.core.types.<API key>; import org.eclipse.smarthome.core.types.CommandOption; import org.openbase.bco.device.openhab.jp.JPOpenHABURI; import org.openbase.jps.core.JPService; import org.openbase.jps.exception.<API key>; import org.openbase.jul.exception.<API key>; import org.openbase.jul.exception.*; import org.openbase.jul.exception.printer.ExceptionPrinter; import org.openbase.jul.exception.printer.LogLevel; import org.openbase.jul.iface.Shutdownable; import org.openbase.jul.pattern.Observable; import org.openbase.jul.pattern.ObservableImpl; import org.openbase.jul.pattern.Observer; import org.openbase.jul.schedule.<API key>; import org.openbase.jul.schedule.SyncObject; import org.openbase.type.domotic.state.ConnectionStateType.ConnectionState; import org.openbase.type.domotic.state.ConnectionStateType.ConnectionState.State; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.ws.rs.ProcessingException; import javax.ws.rs.client.Client; import javax.ws.rs.client.ClientBuilder; import javax.ws.rs.client.Entity; import javax.ws.rs.client.WebTarget; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.sse.InboundSseEvent; import javax.ws.rs.sse.SseEventSource; import java.lang.reflect.Type; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.concurrent.<API key>; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; import java.util.function.Consumer; public abstract class <API key> implements Shutdownable { public static final String SEPARATOR = "/"; public static final String REST_TARGET = "rest"; public static final String APPROVE_TARGET = "approve"; public static final String EVENTS_TARGET = "events"; public static final String TOPIC_KEY = "topic"; public static final String TOPIC_SEPARATOR = SEPARATOR; private static final Logger LOGGER = LoggerFactory.getLogger(<API key>.class); private final SyncObject <API key> = new SyncObject("<API key>"); private final SyncObject <API key> = new SyncObject("<API key>"); private final Map<String, ObservableImpl<Object, JsonObject>> topicObservableMap; private final Client restClient; private final WebTarget restTarget; private SseEventSource sseSource; private boolean shutdownInitiated = false; protected final JsonParser jsonParser; protected final Gson gson; private ScheduledFuture<?> connectionTask; protected ConnectionState.State <API key> = State.DISCONNECTED; public <API key>() throws <API key> { try { this.topicObservableMap = new HashMap<>(); this.gson = new GsonBuilder().<API key>(new ExclusionStrategy() { @Override public boolean shouldSkipField(FieldAttributes fieldAttributes) { return false; } @Override public boolean shouldSkipClass(Class<?> aClass) { // ignore Command Description because its an interface and can not be serialized without any instance creator. if(aClass.equals(CommandDescription.class)) { return true; } return false; } }).create(); this.jsonParser = new JsonParser(); this.restClient = ClientBuilder.newClient(); this.restTarget = restClient.target(JPService.getProperty(JPOpenHABURI.class).getValue().resolve(SEPARATOR + REST_TARGET)); this.setConnectState(State.CONNECTING); } catch (<API key> ex) { throw new <API key>(this, ex); } } private boolean isTargetReachable() { try { testConnection(); } catch (<API key> e) { if (e.getCause() instanceof ProcessingException) { return false; } } return true; } protected abstract void testConnection() throws <API key>; public void <API key>(final ConnectionState.State connectionState, final long timeout, final TimeUnit timeUnit) throws <API key> { synchronized (<API key>) { while (<API key>() != connectionState) { <API key>.wait(timeUnit.toMillis(timeout)); } } } public void <API key>(final ConnectionState.State connectionState) throws <API key> { synchronized (<API key>) { while (<API key>() != connectionState) { <API key>.wait(); } } } private void setConnectState(final ConnectionState.State connectState) { synchronized (<API key>) { // filter non changing states if (connectState == this.<API key>) { return; } LOGGER.trace("Openhab Connection State changed to: "+connectState); // update state this.<API key> = connectState; // handle state change switch (connectState) { case CONNECTING: LOGGER.info("Wait for openHAB..."); try { connectionTask = <API key>.<API key>(() -> { if (isTargetReachable()) { // set connected setConnectState(State.CONNECTED); // cleanup own task connectionTask.cancel(false); } }, 0, 15, TimeUnit.SECONDS); } catch (<API key> | <API key> ex) { // if global executor service is not available we have no chance to connect. LOGGER.warn("Wait for openHAB...", ex); setConnectState(State.DISCONNECTED); } break; case CONNECTED: LOGGER.info("Connection to OpenHAB established."); initSSE(); break; case RECONNECTING: LOGGER.warn("Connection to OpenHAB lost!"); resetConnection(); setConnectState(State.CONNECTING); break; case DISCONNECTED: LOGGER.info("Connection to OpenHAB closed."); resetConnection(); break; } // notify state change <API key>.notifyAll(); // apply next state if required switch (connectState) { case RECONNECTING: setConnectState(State.CONNECTING); break; } } } private void initSSE() { // activate sse source if not already done if (sseSource != null) { LOGGER.warn("SSE already initialized!"); return; } final WebTarget webTarget = restTarget.path(EVENTS_TARGET); sseSource = SseEventSource.target(webTarget).reconnectingEvery(15, TimeUnit.SECONDS).build(); sseSource.open(); final Consumer<InboundSseEvent> evenConsumer = inboundSseEvent -> { // dispatch event try { final JsonObject payload = jsonParser.parse(inboundSseEvent.readData()).getAsJsonObject(); for (Entry<String, ObservableImpl<Object, JsonObject>> topicObserverEntry : topicObservableMap.entrySet()) { try { if (payload.get(TOPIC_KEY).getAsString().matches(topicObserverEntry.getKey())) { topicObserverEntry.getValue().notifyObservers(payload); } } catch (Exception ex) { ExceptionPrinter.printHistory(new <API key>("Could not notify listeners on topic[" + topicObserverEntry.getKey() + "]", ex), LOGGER); } } } catch (Exception ex) { ExceptionPrinter.printHistory(new <API key>("Could not handle SSE payload!", ex), LOGGER); } }; final Consumer<Throwable> errorHandler = ex -> { ExceptionPrinter.printHistory("Openhab connection error detected!", ex, LOGGER, LogLevel.DEBUG); <API key>(); }; final Runnable reconnectHandler = () -> { <API key>(); }; sseSource.register(evenConsumer, errorHandler, reconnectHandler); } public State <API key>() { return <API key>; } public void <API key>() { synchronized (<API key>) { // only validate if connected if (!isConnected()) { return; } // if not reachable init a reconnect if (!isTargetReachable()) { setConnectState(State.RECONNECTING); } } } public boolean isConnected() { return <API key>() == State.CONNECTED; } public void addSSEObserver(Observer<Object, JsonObject> observer) { addSSEObserver(observer, ""); } public void addSSEObserver(final Observer<Object, JsonObject> observer, final String topicRegex) { synchronized (<API key>) { if (topicObservableMap.containsKey(topicRegex)) { topicObservableMap.get(topicRegex).addObserver(observer); return; } final ObservableImpl<Object, JsonObject> observable = new ObservableImpl<>(this); observable.addObserver(observer); topicObservableMap.put(topicRegex, observable); } } public void removeSSEObserver(Observer<Object, JsonObject> observer) { removeSSEObserver(observer, ""); } public void removeSSEObserver(Observer<Object, JsonObject> observer, final String topicFilter) { synchronized (<API key>) { if (topicObservableMap.containsKey(topicFilter)) { topicObservableMap.get(topicFilter).removeObserver(observer); } } } private void resetConnection() { // cancel ongoing connection task if (!connectionTask.isDone()) { connectionTask.cancel(false); } // close sse if (sseSource != null) { sseSource.close(); sseSource = null; } } public void validateConnection() throws <API key> { if (!isConnected()) { throw new <API key>("Openhab not reachable yet!"); } } private String validateResponse(final Response response) throws <API key>, ProcessingException { return validateResponse(response, false); } private String validateResponse(final Response response, final boolean <API key>) throws <API key>, ProcessingException { final String result = response.readEntity(String.class); if (response.getStatus() == 200 || response.getStatus() == 201 || response.getStatus() == 202) { return result; } else if (response.getStatus() == 404) { if (!<API key>) { <API key>(); } throw new <API key>("URL"); } else if (response.getStatus() == 503) { if (!<API key>) { <API key>(); } // throw a processing exception to indicate that openHAB is still not fully started, this is used to wait for openHAB throw new ProcessingException("OpenHAB server not ready"); } else { throw new <API key>("Response returned with ErrorCode[" + response.getStatus() + "], Result[" + result + "] and ErrorMessage[" + response.getStatusInfo().getReasonPhrase() + "]"); } } protected String get(final String target) throws <API key> { return get(target, false); } protected String get(final String target, final boolean skipValidation) throws <API key> { try { // handle validation if (!skipValidation) { validateConnection(); } final WebTarget webTarget = restTarget.path(target); final Response response = webTarget.request().get(); return validateResponse(response, skipValidation); } catch (<API key> | ProcessingException ex) { if (isShutdownInitiated()) { ExceptionProcessor.setInitialCause(ex, new <API key>(this)); } throw new <API key>("Could not get sub-URL[" + target + "]", ex); } } protected String delete(final String target) throws <API key> { try { validateConnection(); final WebTarget webTarget = restTarget.path(target); final Response response = webTarget.request().delete(); return validateResponse(response); } catch (<API key> | ProcessingException ex) { if (isShutdownInitiated()) { ExceptionProcessor.setInitialCause(ex, new <API key>(this)); } throw new <API key>("Could not delete sub-URL[" + target + "]", ex); } } protected String putJson(final String target, final Object value) throws <API key> { return put(target, gson.toJson(value), MediaType.<API key>); } protected String put(final String target, final String value, final MediaType mediaType) throws <API key> { try { validateConnection(); final WebTarget webTarget = restTarget.path(target); final Response response = webTarget.request().put(Entity.entity(value, mediaType)); return validateResponse(response); } catch (<API key> | ProcessingException ex) { if (isShutdownInitiated()) { ExceptionProcessor.setInitialCause(ex, new <API key>(this)); } throw new <API key>("Could not put value[" + value + "] on sub-URL[" + target + "]", ex); } } protected String postJson(final String target, final Object value) throws <API key> { return post(target, gson.toJson(value), MediaType.<API key>); } protected String post(final String target, final String value, final MediaType mediaType) throws <API key> { try { validateConnection(); final WebTarget webTarget = restTarget.path(target); final Response response = webTarget.request().post(Entity.entity(value, mediaType)); return validateResponse(response); } catch (<API key> | ProcessingException ex) { if (isShutdownInitiated()) { ExceptionProcessor.setInitialCause(ex, new <API key>(this)); } throw new <API key>("Could not post Value[" + value + "] of MediaType[" + mediaType + "] on sub-URL[" + target + "]", ex); } } public boolean isShutdownInitiated() { return shutdownInitiated; } @Override public void shutdown() { // prepare shutdown shutdownInitiated = true; setConnectState(State.DISCONNECTED); // stop rest service restClient.close(); // stop sse service synchronized (<API key>) { for (final Observable<Object, JsonObject> <API key> : topicObservableMap.values()) { <API key>.shutdown(); } topicObservableMap.clear(); resetConnection(); } } }
#include "gitrepository.h" #include <qtcacheexception.h> #include <git2.h> inline void git_eval(int err){ if (err) { const git_error* err = giterr_last(); throw QtC::QtCacheException(err->message); } } template<typename T> class git_auto { public: git_auto(T* object = NULL) : ref(object) {} ~git_auto(); operator T*() const { return ref; } T** operator &() {return &ref; } private: T* ref; }; git_auto<git_repository>::~git_auto() { git_repository_free(this->ref); } git_auto<git_signature>::~git_auto() { git_signature_free(this->ref); } git_auto<git_index>::~git_auto() { git_index_free(this->ref); } git_auto<git_tree>::~git_auto() { git_tree_free(this->ref); } git_auto<git_reference>::~git_auto() { git_reference_free(this->ref); } git_auto<git_commit>::~git_auto() { git_commit_free(this->ref); } git_auto<git_status_list>::~git_auto() { <API key>(this->ref); } git_auto<git_remote>::~git_auto() { if (this->ref && <API key>(this->ref)) { <API key>(this->ref); } git_remote_free(this->ref); } GitRepository::GitRepository(const QString &localDirPath) : m_local_dir_path(localDirPath), m_repo(NULL), m_signature(NULL) { git_libgit2_init(); } GitRepository::~GitRepository() { if (NULL != m_signature) { git_signature_free(m_signature); } if (NULL != m_repo) { git_repository_free(m_repo); } <API key>(); } bool GitRepository::isOpen() { return NULL != m_repo; } void GitRepository::setRepository(git_repository* repo) { if (NULL != m_repo){ git_repository_free(m_repo); } m_repo = repo; } git_repository* GitRepository::repository() { if (NULL == m_repo){ try{ open(); }catch(...){ try{ init(); }catch(...){ throw; } } } return m_repo; } void GitRepository::open() { git_repository* repo = NULL; git_eval(git_repository_open(&repo, m_local_dir_path.absolutePath().toLocal8Bit())); setRepository(repo); } void GitRepository::init() { git_repository* repo = NULL; <API key> initopts = <API key>; initopts.flags = <API key>; git_eval(<API key>(&repo, m_local_dir_path.absolutePath().toLocal8Bit(), &initopts)); git_auto<git_index> index; git_eval(<API key>(&index, repo)); git_oid tree_id; git_eval(<API key>(&tree_id, index)); git_auto<git_tree> tree; git_eval(git_tree_lookup(&tree, repo, &tree_id)); git_oid commit_id; git_eval(git_commit_create_v(&commit_id, repo, "HEAD", signature(), signature(), NULL, "Initial commit", tree, 0)); setRepository(repo); } void GitRepository::branch(const QString& name) { git_repository* repo = repository(); git_auto<git_reference> branch; int err = git_branch_lookup(&branch, repo, name.toLatin1(), GIT_BRANCH_LOCAL); if (err == GIT_ENOTFOUND){ git_oid parent_id; git_auto<git_commit> parent; git_eval(<API key>(&parent_id, repo, "HEAD")); git_eval(git_commit_lookup(&parent, repo, &parent_id)); git_eval(git_branch_create(&branch, repo, name.toLocal8Bit(), parent, 1)); }else{ git_eval(err); } git_eval(<API key>(repo, git_reference_name(branch))); <API key> opts = <API key>; opts.checkout_strategy = GIT_CHECKOUT_FORCE; git_eval(git_checkout_head(repo, &opts)); } void GitRepository::add(const QString& filepath) { git_repository* repo = repository(); git_auto<git_index> index; git_eval(<API key>(&index, repo)); git_eval(<API key>(index, filepath.toLatin1())); git_index_write(index); git_index_free(index); } void GitRepository::commit(const QString& message) { git_repository* repo = repository(); { git_auto<git_status_list> changes; git_eval(git_status_list_new(&changes, repo, NULL)); if (<API key>(changes) == 0) { return; } } git_auto<git_index> index; git_eval(<API key>(&index, repo)); git_oid tree_id; git_eval(<API key>(&tree_id, index)); git_auto<git_tree> tree; git_eval(git_tree_lookup(&tree, repo, &tree_id)); git_oid parent_id; git_eval(<API key>(&parent_id, repo, "HEAD")); git_auto<git_commit> parent; git_eval(git_commit_lookup(&parent, repo, &parent_id)); git_oid commit_id; git_signature* sig = signature(); git_eval(git_commit_create_v(&commit_id, repo, "HEAD", sig, sig, NULL, message.toLocal8Bit(), tree, 1, parent)); } void GitRepository::clone(const QString& url) { git_repository* repo = NULL; git_clone_options opts = <API key>; opts.checkout_branch = "master"; git_eval(git_clone(&repo, url.toLatin1(), m_local_dir_path.absolutePath().toLocal8Bit(), &opts)); setRepository(repo); } void GitRepository::push() { git_repository* repo = repository(); const char* remote_name = "origin"; git_auto<git_remote> remote; git_eval(git_remote_lookup(&remote, repo, remote_name)); git_eval(git_remote_connect(remote, GIT_DIRECTION_PUSH, NULL, NULL)); git_auto<git_reference> head; git_eval(git_repository_head(&head, repo)); QString refname = QString("+%1:%1").arg(git_reference_name(head)); git_eval(git_remote_add_push(repo, remote_name, refname.toLatin1())); git_eval(git_remote_upload(remote, NULL, NULL)); } void GitRepository::fetch() { git_repository* repo = repository(); const char* remote_name = "origin"; git_auto<git_remote> remote; git_eval(git_remote_lookup(&remote, repo, remote_name)); git_eval(git_remote_connect(remote, GIT_DIRECTION_FETCH, NULL, NULL)); git_eval(git_remote_fetch(remote, NULL, NULL, NULL)); } void GitRepository::setSignature(const QString& authorName, const QString& authorEmail) { git_signature* sig = m_signature; if (sig) { git_signature_free(sig); } git_eval(git_signature_now(&sig, authorName.toLocal8Bit(), authorEmail.toLocal8Bit())); m_signature = sig; } git_signature* GitRepository::signature() { if (!m_signature) { setSignature(); } return m_signature; }
using System; using SonarLint.VisualStudio.Progress.Controller; namespace SonarLint.VisualStudio.Progress.UnitTests { <summary> Partial class implementation of <see cref="<API key>"/> </summary> public partial class <API key> : <API key> { void <API key>.ProgressChanged(string progressDetailText, double progress) { this.progressChanges.Add(Tuple.Create(progressDetailText, progress)); } } }
<?php /** * Common interface for items that carry sorting informations. * * @package MShop * @subpackage Common */ interface <API key> { /** * Returns the position of the item in the list. * * @return integer Position of the item in the list */ public function getPosition(); /** * Sets the new position of the item in the list. * * @param integer $pos position of the item in the list * @return void */ public function setPosition( $pos ); }
#!/bin/zsh export PATH="${HOME}/bin:${HOME}/script:${PATH}" export HISTSIZE=1000000 if [[ -z "${HOSTNAME}" ]] ; then export HOSTNAME="${HOST:-$(hostname)}" fi if [[ -d "${MYSHELL}/plugins" ]]; then for i in "${MYSHELL}/plugins/"* ; do source "${i}" done fi function prompt_char() { if [ $UID -eq 0 ]; then echo "#"; else echo $; fi } local ret_status="%(?:%{$fg_bold[green]%}$(prompt_char) :%{$fg_bold[red]%}$(prompt_char) %s)" PROMPT='%(!.%{$fg_bold[red]%}.%{$fg_bold[red]%}%m%{$fg_bold[green]%} )%n %{$fg_bold[blue]%}%(!.%1~.%~) $(git_prompt_info)%_${ret_status}%{$reset_color%}' <API key>="(%{$fg[red]%}" <API key>="%{$reset_color%}" <API key>="%{$fg[blue]%}%{$fg[yellow]%}*%{$fg[blue]%}) " <API key>="%{$fg[blue]%}) " lsopt="-F" dfopt="-h" if [ -x /usr/bin/dircolors ]; then lsopt="${lsopt} --color=auto" alias grep='grep --color=auto' fi if [[ "$(uname)" == "FreeBSD" ]] || [[ "$(uname)" == "Darwin" ]] ; then lsopt="${lsopt} -GF" else lshelp="$(ls --help)" [ "$(grep -- "--show-control-chars" <<<"${lshelp}")" ] && \ lsopt="${lsopt} --show-control-chars" [ "$(grep -- "--<API key>" <<<"${lshelp}")" ] && \ lsopt="${lsopt} --<API key>" dfopt="${dfopt} -T -x supermount" fi alias l="ls ${lsopt}" alias la='l -a' alias l1='l -1' alias ll='l -l' alias lla='l -la' alias lsd='l -d */' alias df="df ${dfopt}" unset lshelp lsopt dfopt alias ssu='sudo -H bash --rcfile "${HOME}/.bashrc"' alias myip='dig +short myip.opendns.com @resolver1.opendns.com || wget -qO /dev/stdout "http: if (( $+commands[ssh] )) ; then alias ssh='ssh -<API key>=no' alias ssht='ssh tsaikd@home.tsaikd.org' fi if (( $+commands[vim] )) ; then export EDITOR="${EDITOR:-vim}" fi if (( $+commands[direnv] )) ; then eval "$(direnv hook zsh)" fi if (( $+commands[docker] )) ; then alias dklog="docker logs -f" alias dkre="docker restart -t 0" fi if (( $+commands[gitk] )) ; then alias gitk='gitk --all &' fi if [[ "${TERM}" == "xterm" ]] ; then if (( $+commands[tmux] )) ; then if [[ -z "${TMUX}" ]] ; then tmux attach || tmux fi elif (( $+commands[screen] )) ; then screen -wipe screen -x "$(whoami)" || screen -S "$(whoami)" elif [ "$(uname -s)" != "Darwin" ] ; then [ "$(id -u)" -ne 0 ] && [ -n "$(type -p last)" ] && last -5 fi elif [ "$(uname -s)" != "Darwin" ] ; then [ "$(id -u)" -ne 0 ] && [ -n "$(type -p last)" ] && last -5 fi if (( $+functions[kube_ps1] )); then KUBE_PS1_SUFFIX=") " PROMPT='$(kube_ps1)'${PROMPT} fi # load custom script post login if [ -d "${MYSHELL}/custom/zsh/login-post" ] ; then for i in $(find "${MYSHELL}/custom/zsh/login-post" -iname \*.zsh) ; do source "${i}" done fi [ -f "${HOME}/.zshrc.local" ] && \ source "${HOME}/.zshrc.local" unset i
create schema if not exists toughradius collate utf8mb4_unicode_ci; CREATE USER IF NOT EXISTS raduser@'172.%.%.%' identified by 'radpwd'; GRANT ALL PRIVILEGES ON toughradius.* TO raduser@'172.%.%.%'; ALTER USER 'raduser'@'172.%.%.%' IDENTIFIED WITH <API key> BY 'radpwd'; use toughradius; create table if not exists tr_bras ( id bigint auto_increment primary key, identifier varchar(128) null, name varchar(64) not null, ipaddr varchar(32) null, vendor_id varchar(32) not null, portal_vendor varchar(32) not null, secret varchar(64) not null, coa_port int not null, ac_port int not null, auth_limit int null, acct_limit int null, status enum('enabled', 'disabled') null, remark varchar(512) null, create_time datetime not null ); create index <API key> on tr_bras (identifier); create index ix_tr_bras_ipaddr on tr_bras (ipaddr); create table if not exists tr_config ( id bigint auto_increment primary key, type varchar(32) not null, name varchar(128) not null, value varchar(255) null, remark varchar(255) null ); create table if not exists tr_subscribe ( id bigint auto_increment primary key, node_id bigint default 0 not null, subscriber varchar(32) null, realname varchar(32) null, password varchar(128) not null, domain varchar(128) null, addr_pool varchar(128) null, policy varchar(512) null, is_online int null, active_num int null, bind_mac tinyint(1) null, bind_vlan tinyint(1) null, ip_addr varchar(32) null, mac_addr varchar(32) null, in_vlan int null, out_vlan int null, up_rate bigint null, down_rate bigint null, up_peak_rate bigint null, down_peak_rate bigint null, up_rate_code varchar(32) null, down_rate_code varchar(32) null, status enum('enabled', 'disabled') null, remark varchar(512) null, begin_time datetime not null, expire_time datetime not null, create_time datetime not null, update_time datetime null ); create index <API key> on tr_subscribe (create_time); create index <API key> on tr_subscribe (expire_time); create index <API key> on tr_subscribe (status); create index <API key> on tr_subscribe (subscriber); create index <API key> on tr_subscribe (update_time); use toughradius; INSERT INTO toughradius.tr_bras (identifier, name, ipaddr, vendor_id, portal_vendor,secret, coa_port,ac_port, auth_limit, acct_limit, STATUS, remark, create_time) VALUES ('radius-tester', 'radius-tester', '127.0.0.1', '14988',"cmccv1", 'secret', 3799,2000, 1000, 1000, NULL, '0', '2019-03-01 14:07:46'); INSERT INTO toughradius.tr_subscribe (node_id, subscriber, realname, password, domain, addr_pool, policy, is_online, active_num, bind_mac, bind_vlan, ip_addr, mac_addr, in_vlan, out_vlan, up_rate, down_rate, up_peak_rate, down_peak_rate, up_rate_code, down_rate_code, status, remark, begin_time, expire_time, create_time, update_time) VALUES (0, 'test01', '', '888888', null, null, null, null, 10, 0, 0, '', '', 0, 0, 10.000, 10.000, 100.000, 100.000, '10', '10', 'enabled', '', '2019-03-01 14:13:02', '2019-03-01 14:13:00', '2019-03-01 14:12:59', '2019-03-01 14:12:56');
#include <stdio.h> #include <stdlib.h> int icomp = 0; int iswap = 0; int cmp_fun(int a, int b) { icomp++; return a > b; } int swap(int * a, int * b) { *a = *a ^ *b; *b = *a ^ *b; *a = *a ^ *b; iswap ++; return 1; } int select_sort(int *pList, int len) { if(NULL == pList || len < 0) { return -1; } int i = 0; for(i = 0; i < len; i++) { int iTop = pList[i]; int iPos = i; int j = 0; for(j = i + 1; j < len; j++) { if(cmp_fun(iTop, pList[j])) { iTop = pList[j]; iPos = j; } } if(i != iPos) { swap(&pList[i], &pList[iPos]); } } return 0; } int get_list(int *list, int len) { srand(374676); int i = 0; for(i = 0; i < len; i++) { list[i] = rand() % (len * 20); } return 0; } int check_list(int *list, int len) { int i; int iCnt = 0; for(i = 0; i < len - 1; i++) { if(cmp_fun(list[i], list[i + 1])) { iCnt++; } } return iCnt; } void show_list(int *pList, int len) { int i = 0; for(i = 0; i < len; i++) { printf("%d ", pList[i]); } printf("\n"); } int test_sort(int n) { icomp = 0; iswap = 0; int *pList = (int*)malloc(sizeof(int) * n); get_list(pList, n); //show_list(pList, n); select_sort(pList, n); int iThro = n * (n + 1) / 2; printf("n = %d, tcmp = %d, rcmp = %d, dc = %lf\n", n, iThro, icomp, (double)icomp / iThro); printf("n = %d, tswp = %d, rswp = %d, ds = %lf\n", n, n - 1, iswap, (double)iswap / (n - 1)); int iT = check_list(pList, n); if(iT) { printf("sort faild, [%d]\n", iT); } //show_list(pList, n); free(pList); printf("\n"); return 0; } int main() { int i = 0; for(i = 16; i <= 1024 * 16; i *= 2) { test_sort(i); } return 0; }
## Welcome to GitHub Pages You can use the [editor on GitHub](https://github.com/ldscholar/ldscholar.github.io/edit/master/README.md) to maintain and preview the content for your website in Markdown files. Whenever you commit to this repository, GitHub Pages will run [Jekyll](https://jekyllrb.com/) to rebuild the pages in your site, from the content in your Markdown files. Markdown Markdown is a lightweight and easy-to-use syntax for styling your writing. It includes conventions for markdown Syntax highlighted code block # Header 1 ## Header 2 Header 3 - Bulleted - List 1. Numbered 2. List **Bold** and _Italic_ and `Code` text [Link](url) and ![Image](src) For more details see [GitHub Flavored Markdown](https://guides.github.com/features/mastering-markdown/). Jekyll Themes Your Pages site will use the layout and styles from the Jekyll theme you have selected in your [repository settings](https://github.com/ldscholar/ldscholar.github.io/settings). The name of this theme is saved in the Jekyll `_config.yml` configuration file. Support or Contact Having trouble with Pages? Check out our [documentation](https:
#include "StructuralInterface.h" StructuralInterface::StructuralInterface (StructuralEntity *parent) : StructuralEntity (parent) { setCategory (Structural::Interface); setStructuralType (Structural::NoType); setResizable (false); setTop (0); setLeft (0); setWidth (<API key>); setHeight (<API key>); if (!<API key>) setHidden (true); } void StructuralInterface::adjust (bool collision, bool recursion) { StructuralEntity::adjust (collision, recursion); // Adjusting position... StructuralEntity *parent = structuralParent (); if (parent || !ST_OPT_WITH_BODY) { if (!collision) { // Tries (10x) to find a position where there is no collision with others // relatives for (int i = 0; i < 10; i++) { bool colliding = false; for (StructuralEntity *ent : StructuralUtil::neighbors (this)) { if (ent != this) { int n = 0, max = 1000; qreal current = 0.0; ent->setSelectable (false); while (collidesWithItem (ent, Qt::<API key>)) { QLineF line = QLineF (left () + width () / 2, top () + height () / 2, ent->width () / 2, ent->height () / 2); line.setAngle (qrand () % 360); current += (double)(qrand () % 100) / 1000.0; setTop (top () + line.pointAt (current / 2).y () - line.p1 ().y ()); setLeft (left () + line.pointAt (current / 2).x () - line.p1 ().x ()); if (++n > max) break; } constrain (); ent->setSelectable (true); } } for (StructuralEntity *ent : StructuralUtil::neighbors (this)) if (collidesWithItem (ent, Qt::<API key>)) colliding = true; if (!colliding) break; } } constrain (); StructuralUtil::adjustEdges (this); } } void StructuralInterface::constrain () { StructuralEntity *parent = structuralParent (); if (parent != nullptr) { QPointF tail (parent->width () / 2, parent->height () / 2); QPointF head (left () + width () / 2, top () + height () / 2); if (tail == head) { head.setX (tail.x ()); head.setY (tail.y () - 10); } QPointF p = head; QLineF line (tail, head); bool status = true; qreal current = 1.0; qreal step = 0.01; if (!parent->contains (p)) { step = -0.01; status = false; } do { current += step; p = line.pointAt (current); } while (parent->contains (p) == status); if (QLineF (p, head).length () > 7) { setTop (p.y () - height () / 2); setLeft (p.x () - width () / 2); } } } void StructuralInterface::draw (QPainter *painter) { int x = <API key> + <API key>; int y = <API key> + <API key>; int w = width () - 2 * <API key>; int h = height () - 2 * <API key>; painter->drawPixmap (x, y, w, h, QPixmap (StructuralUtil::icon (structuralType ()))); if (!ST_OPT_WITH_BODY && !<API key>) { if (property (<API key>) == ST_VALUE_TRUE) { painter->setPen (QPen (QBrush (QColor (76, 76, 76)), 2)); painter->drawRect (x, y, w, h); } } if (!error ().isEmpty () || !warning ().isEmpty ()) { QString icon; if (!error ().isEmpty ()) icon = QString (<API key>); else icon = QString (<API key>); painter->drawPixmap (x + w / 2 - (<API key> - 3) / 2, y + h / 2 - (<API key> - 3) / 2, <API key> - 3, <API key> - 3, QPixmap (icon)); } if (isMoving ()) { painter->setBrush (QBrush (Qt::NoBrush)); painter->setPen (QPen (QBrush (Qt::black), 0)); int moveX = x + moveLeft () - left (); int moveY = y + moveTop () - top (); int moveW = w; int moveH = h; painter->drawRect (moveX, moveY, moveW, moveH); } }
package org.sonar.api.server.authentication; import javax.annotation.concurrent.Immutable; import static com.google.common.base.Preconditions.checkArgument; import static org.apache.commons.lang.StringUtils.isNotBlank; /** * Display information provided by the Identity Provider to be displayed into the login form. * * @since 5.4 */ @Immutable public final class Display { private final String iconPath; private final String backgroundColor; private Display(Builder builder) { this.iconPath = builder.iconPath; this.backgroundColor = builder.backgroundColor; } public String getIconPath() { return iconPath; } /** * Background color for the provider button displayed in the login form. * It's a Hexadecimal value, for instance #205081. * <br> * If not provided, the default value is #236a97 */ public String getBackgroundColor() { return backgroundColor; } public static Builder builder() { return new Builder(); } public static class Builder { private String iconPath; private String backgroundColor = "#236a97"; private Builder() { } /** * @see Display#getIconPath() */ public Builder setIconPath(String iconPath) { this.iconPath = iconPath; return this; } /** * @see Display#getBackgroundColor() */ public Builder setBackgroundColor(String backgroundColor) { this.backgroundColor = backgroundColor; return this; } public Display build() { checkArgument(isNotBlank(iconPath), "Icon path must not be blank"); <API key>(); return new Display(this); } private void <API key>() { checkArgument(isNotBlank(backgroundColor), "Background color must not be blank"); checkArgument(backgroundColor.length() == 7 && backgroundColor.indexOf(' "Background color must begin with a sharp followed by 6 characters"); } } }
package org.sonar.server.computation.step; import com.google.common.collect.ImmutableMap; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.commons.codec.digest.DigestUtils; import org.apache.ibatis.session.ResultContext; import org.apache.ibatis.session.ResultHandler; import org.sonar.api.utils.System2; import org.sonar.batch.protocol.output.BatchReport; import org.sonar.core.persistence.DbSession; import org.sonar.core.persistence.MyBatis; import org.sonar.core.source.db.FileSourceDto; import org.sonar.core.source.db.FileSourceDto.Type; import org.sonar.server.computation.batch.BatchReportReader; import org.sonar.server.computation.component.Component; import org.sonar.server.computation.component.<API key>; import org.sonar.server.computation.component.TreeRootHolder; import org.sonar.server.computation.source.<API key>; import org.sonar.server.computation.source.CoverageLineReader; import org.sonar.server.computation.source.<API key>; import org.sonar.server.computation.source.<API key>; import org.sonar.server.computation.source.LineReader; import org.sonar.server.computation.source.ScmLineReader; import org.sonar.server.computation.source.SymbolsLineReader; import org.sonar.server.db.DbClient; import org.sonar.server.source.db.FileSourceDb; import org.sonar.server.util.CloseableIterator; import static org.sonar.server.computation.component.<API key>.Order.PRE_ORDER; public class <API key> implements ComputationStep { private final DbClient dbClient; private final System2 system2; private final TreeRootHolder treeRootHolder; private final BatchReportReader reportReader; public <API key>(DbClient dbClient, System2 system2, TreeRootHolder treeRootHolder, BatchReportReader reportReader) { this.dbClient = dbClient; this.system2 = system2; this.treeRootHolder = treeRootHolder; this.reportReader = reportReader; } @Override public void execute() { // Don't use batch insert for file_sources since keeping all data in memory can produce OOM for big files DbSession session = dbClient.openSession(false); try { new FileSourceVisitor(session).visit(treeRootHolder.getRoot()); } finally { MyBatis.closeQuietly(session); } } private class FileSourceVisitor extends <API key> { private final DbSession session; private Map<String, FileSourceDto> <API key> = new HashMap<>(); private String projectUuid; private FileSourceVisitor(DbSession session) { super(Component.Type.FILE, PRE_ORDER); this.session = session; } @Override public void visitProject(Component project) { this.projectUuid = project.getUuid(); session.select("org.sonar.core.source.db.FileSourceMapper.<API key>", ImmutableMap.of("projectUuid", projectUuid, "dataType", Type.SOURCE), new ResultHandler() { @Override public void handleResult(ResultContext context) { FileSourceDto dto = (FileSourceDto) context.getResultObject(); <API key>.put(dto.getFileUuid(), dto); } }); } @Override public void visitFile(Component file) { int fileRef = file.getRef(); BatchReport.Component component = reportReader.readComponent(fileRef); CloseableIterator<String> linesIterator = reportReader.readFileSource(fileRef); LineReaders lineReaders = new LineReaders(reportReader, fileRef); try { <API key> <API key> = new <API key>(linesIterator, lineReaders.readers(), component.getLines()); <API key>.Data fileSourceData = <API key>.compute(); persistSource(fileSourceData, file.getUuid()); } catch (Exception e) { throw new <API key>(String.format("Cannot persist sources of %s", file.getKey()), e); } finally { linesIterator.close(); lineReaders.close(); } } private void persistSource(<API key>.Data fileSourceData, String componentUuid) { FileSourceDb.Data fileData = fileSourceData.getFileSourceData(); byte[] data = FileSourceDto.encodeSourceData(fileData); String dataHash = DigestUtils.md5Hex(data); String srcHash = fileSourceData.getSrcHash(); String lineHashes = fileSourceData.getLineHashes(); FileSourceDto previousDto = <API key>.get(componentUuid); if (previousDto == null) { FileSourceDto dto = new FileSourceDto() .setProjectUuid(projectUuid) .setFileUuid(componentUuid) .setDataType(Type.SOURCE) .setBinaryData(data) .setSrcHash(srcHash) .setDataHash(dataHash) .setLineHashes(lineHashes) .setCreatedAt(system2.now()) .setUpdatedAt(system2.now()); dbClient.fileSourceDao().insert(session, dto); session.commit(); } else { // Update only if data_hash has changed or if src_hash is missing (progressive migration) boolean binaryDataUpdated = !dataHash.equals(previousDto.getDataHash()); boolean srcHashUpdated = !srcHash.equals(previousDto.getSrcHash()); if (binaryDataUpdated || srcHashUpdated) { previousDto .setBinaryData(data) .setDataHash(dataHash) .setSrcHash(srcHash) .setLineHashes(lineHashes); // Optimization only change updated at when updating binary data to avoid unnecessary indexation by E/S if (binaryDataUpdated) { previousDto.setUpdatedAt(system2.now()); } dbClient.fileSourceDao().update(previousDto); session.commit(); } } } } private static class LineReaders { private final List<LineReader> readers = new ArrayList<>(); private final List<CloseableIterator<?>> iterators = new ArrayList<>(); LineReaders(BatchReportReader reportReader, int componentRef) { CloseableIterator<BatchReport.Coverage> <API key> = reportReader.<API key>(componentRef); BatchReport.Changesets scmReport = reportReader.readChangesets(componentRef); CloseableIterator<BatchReport.SyntaxHighlighting> <API key> = reportReader.<API key>(componentRef); List<BatchReport.Symbols.Symbol> symbols = reportReader.<API key>(componentRef); List<BatchReport.Duplication> duplications = reportReader.<API key>(componentRef); if (<API key> != null) { iterators.add(<API key>); readers.add(new CoverageLineReader(<API key>)); } if (scmReport != null) { readers.add(new ScmLineReader(scmReport)); } if (<API key> != null) { iterators.add(<API key>); readers.add(new <API key>(<API key>)); } if (!duplications.isEmpty()) { readers.add(new <API key>(duplications)); } if (!symbols.isEmpty()) { readers.add(new SymbolsLineReader(symbols)); } } List<LineReader> readers() { return readers; } void close() { for (CloseableIterator<?> reportIterator : iterators) { reportIterator.close(); } } } @Override public String getDescription() { return "Persist file sources"; } }
package com.wangdaye.common.base.fragment; import com.wangdaye.common.base.activity.LoadableActivity; import java.util.List; /** * Loadable fragment. * */ public abstract class LoadableFragment<T> extends MysplashFragment { /** * {@link LoadableActivity#loadMoreData(List, int, boolean)}. * */ public abstract List<T> loadMoreData(List<T> list, int headIndex, boolean headDirection); }
#ifndef <API key> #define <API key> #ifdef __cplusplus extern "C" { #endif #include <limits.h> #include <stdlib.h> #ifndef SuiteSparse_long #ifdef _WIN64 #define SuiteSparse_long __int64 #define <API key> _I64_MAX #define <API key> "I64d" #else #define SuiteSparse_long long #define <API key> LONG_MAX #define <API key> "ld" #endif #define SuiteSparse_long_id "%" <API key> #endif /* For backward compatibility with prior versions of SuiteSparse. The UF_* * macros are deprecated and will be removed in a future version. */ #ifndef UF_long #define UF_long SuiteSparse_long #define UF_long_max <API key> #define UF_long_idd <API key> #define UF_long_id SuiteSparse_long_id #endif /* SuiteSparse-wide parameters will be placed in this struct. */ typedef struct <API key> { void *(*malloc_memory) (size_t) ; /* pointer to malloc */ void *(*realloc_memory) (void *, size_t) ; /* pointer to realloc */ void (*free_memory) (void *) ; /* pointer to free */ void *(*calloc_memory) (size_t, size_t) ; /* pointer to calloc */ } SuiteSparse_config ; void *SuiteSparse_malloc /* pointer to allocated block of memory */ ( size_t nitems, /* number of items to malloc (>=1 is enforced) */ size_t size_of_item, /* sizeof each item */ int *ok, /* TRUE if successful, FALSE otherwise */ SuiteSparse_config *config /* SuiteSparse-wide configuration */ ) ; void *SuiteSparse_free /* always returns NULL */ ( void *p, /* block to free */ SuiteSparse_config *config /* SuiteSparse-wide configuration */ ) ; void SuiteSparse_tic /* start the timer */ ( double tic [2] /* output, contents undefined on input */ ) ; double SuiteSparse_toc /* return time in seconds since last tic */ ( double tic [2] /* input: from last call to SuiteSparse_tic */ ) ; double SuiteSparse_time /* returns current wall clock time in seconds */ ( void ) ; /* determine which timer to use, if any */ #ifndef NTIMER #ifdef _POSIX_C_SOURCE #if _POSIX_C_SOURCE >= 199309L #define <API key> #endif #endif #endif /* SuiteSparse is not a package itself, but a collection of packages, some of * which must be used together (UMFPACK requires AMD, CHOLMOD requires AMD, * COLAMD, CAMD, and CCOLAMD, etc). A version number is provided here for the * collection itself. The versions of packages within each version of * SuiteSparse are meant to work together. Combining one packge from one * version of SuiteSparse, with another package from another version of * SuiteSparse, may or may not work. * * SuiteSparse contains the following packages: * * SuiteSparse_config version 4.0.0 (version always the same as SuiteSparse) * AMD version 2.3.0 * BTF version 1.2.0 * CAMD version 2.3.0 * CCOLAMD version 2.8.0 * CHOLMOD version 2.0.0 * COLAMD version 2.8.0 * CSparse version 3.1.0 * CXSparse version 3.1.0 * KLU version 1.2.0 * LDL version 2.1.0 * RBio version 2.1.0 * SPQR version 1.3.0 (full name is SuiteSparseQR) * UMFPACK version 5.6.0 * MATLAB_Tools various packages & M-files * * Other package dependencies: * BLAS required by CHOLMOD and UMFPACK * LAPACK required by CHOLMOD * METIS 4.0.1 required by CHOLMOD (optional) and KLU (optional) */ #define SUITESPARSE_DATE "Jun 1, 2012" #define <API key>(main,sub) ((main) * 1000 + (sub)) #define <API key> 4 #define <API key> 0 #define <API key> 0 #define SUITESPARSE_VERSION \ <API key>(<API key>,<API key>) #ifdef __cplusplus } #endif #endif
<?php if (!defined('TL_ROOT')) die('You can not access this file directly!'); $GLOBALS['TL_LANG']['<API key>']['title'] = array('Título', 'Por favor introduce el título del canal'); $GLOBALS['TL_LANG']['<API key>']['jumpTo'] = array('Saltar a página', 'Por favor seleccion la página a la que los visitantes serán redirigidos cuando seleccionen una newsletter.'); $GLOBALS['TL_LANG']['<API key>']['useSMTP'] = array('Servidor SMTP personalizado', 'Utilizar un servidor SMTP específico para enviar boletines.'); $GLOBALS['TL_LANG']['<API key>']['smtpHost'] = array('Nombre de servidor SMTP', 'Indique el nombre del servidor SMTP.'); $GLOBALS['TL_LANG']['<API key>']['smtpUser'] = array('Nombre de usuario SMTP', 'Permite indicar el nombre de usuario para identificarse con el servidor SMTP.'); $GLOBALS['TL_LANG']['<API key>']['smtpPass'] = array('Contraseña SMTP', 'Permite indicar la contraseña para identificarse con el servidor SMTP.'); $GLOBALS['TL_LANG']['<API key>']['smtpEnc'] = array('Cifrado SMTP', 'Aqui puedes seleccionar un método de cifrado (SSL o TLS).'); $GLOBALS['TL_LANG']['<API key>']['smtpPort'] = array('Número de puerto SMTP', 'Indique el número de puerto del servidor SMTP.'); $GLOBALS['TL_LANG']['<API key>']['tstamp'] = array('Fecha de revisión', 'Fecha y hora de la última revisión'); $GLOBALS['TL_LANG']['<API key>']['title_legend'] = 'Título y redirección'; $GLOBALS['TL_LANG']['<API key>']['smtp_legend'] = 'Configuación SMTP'; $GLOBALS['TL_LANG']['<API key>']['new'] = array('Nuevo canal', 'Crear un canal nuevo'); $GLOBALS['TL_LANG']['<API key>']['show'] = array('Detalles de canal', 'Mostrar los detalles del canal con ID %s'); $GLOBALS['TL_LANG']['<API key>']['edit'] = array('Editar canal', 'Editar canal con ID %s'); $GLOBALS['TL_LANG']['<API key>']['editheader'] = array('Editar ajustes de canal', 'Editar los ajsutes del canal con ID %s'); $GLOBALS['TL_LANG']['<API key>']['copy'] = array('Copiar canal', 'Copiar canal con ID %s'); $GLOBALS['TL_LANG']['<API key>']['delete'] = array('Eliminar canal', 'Eliminar cana con ID %s'); $GLOBALS['TL_LANG']['<API key>']['recipients'] = array('Editar receptores', 'Editar los receptores del canal con ID %s'); ?>
package igeo; import java.awt.*; import igeo.gui.*; /** Class of point object. @author Satoru Sugihara */ public class IPoint extends IGeometry implements IVecI{ //public IVecI pos; public IVec pos; public IPoint(){ pos = new IVec(); initPoint(null); } public IPoint(IVec v){ pos = v; initPoint(null); } public IPoint(IVecI v){ pos = v.get(); initPoint(null); } public IPoint(double x, double y, double z){ pos = new IVec(x,y,z); initPoint(null); } public IPoint(double x, double y){ pos = new IVec(x,y); initPoint(null); } public IPoint(IServerI s){ super(s); pos = new IVec(0,0,0); initPoint(s); } public IPoint(IServerI s, IVec v){ super(s); pos = v; initPoint(s); } public IPoint(IServerI s, IVecI v){ super(s); pos = v.get(); initPoint(s); } public IPoint(IServerI s, double x, double y, double z){ super(s); pos = new IVec(x,y,z); initPoint(s); } public IPoint(IServerI s, double x, double y){ super(s); pos = new IVec(x,y); initPoint(s); } public IPoint(IPoint p){ super(p); pos = p.pos.dup(); initPoint(p.server); //setColor(p.getColor()); } public IPoint(IServerI s, IPoint p){ super(s,p); pos = p.pos.dup(); initPoint(s); //setColor(p.getColor()); } public /*protected*/ void initPoint(IServerI s){ if(pos==null){ IOut.err("null value is set in IPoint"); return; } // // costly to use instanceof? //if(pos instanceof IVec) parameter = (IVec)pos; //else if(pos instanceof IVecR) parameter = (IVecR)pos; //else if(pos instanceof IVec4) parameter = (IVec4)pos; //else if(pos instanceof IVec4R) parameter = (IVec4R)pos; //addGraphic(new IPointGraphic(this)); if(graphics==null) initGraphic(s); // not init when using copy constructor } public IGraphicObject createGraphic(IGraphicMode m){ if(m.isNone()) return null; return new IPointGraphic(this); } synchronized public double x(){ return pos.x(); } synchronized public double y(){ return pos.y(); } synchronized public double z(){ return pos.z(); } synchronized public IPoint x(double vx){ pos.x(vx); return this; } synchronized public IPoint y(double vy){ pos.y(vy); return this; } synchronized public IPoint z(double vz){ pos.z(vz); return this; } synchronized public IPoint x(IDoubleI vx){ pos.x(vx); return this; } synchronized public IPoint y(IDoubleI vy){ pos.y(vy); return this; } synchronized public IPoint z(IDoubleI vz){ pos.z(vz); return this; } synchronized public IPoint x(IVecI vx){ pos.x(vx); return this; } synchronized public IPoint y(IVecI vy){ pos.y(vy); return this; } synchronized public IPoint z(IVecI vz){ pos.z(vz); return this; } synchronized public IPoint x(IVec2I vx){ pos.x(vx); return this; } synchronized public IPoint y(IVec2I vy){ pos.y(vy); return this; } synchronized public double x(ISwitchE e){ return pos.x(e); } synchronized public double y(ISwitchE e){ return pos.y(e); } synchronized public double z(ISwitchE e){ return pos.z(e); } synchronized public IDouble x(ISwitchR r){ return pos.x(r); } synchronized public IDouble y(ISwitchR r){ return pos.y(r); } synchronized public IDouble z(ISwitchR r){ return pos.z(r); } //synchronized public IVec get(){ return pos.get(); } // when pos is IVecI synchronized public IVec get(){ return pos; } /** passing position field */ synchronized public IVec pos(){ return pos; } /** center is same with position */ synchronized public IVec center(){ return pos(); } synchronized public IPoint dup(){ return new IPoint(this); } synchronized public IVec2 to2d(){ return pos.to2d(); } synchronized public IVec2 to2d(IVecI projectionDir){ return pos.to2d(projectionDir); } synchronized public IVec2 to2d(IVecI xaxis, IVecI yaxis){ return pos.to2d(xaxis,yaxis); } synchronized public IVec2 to2d(IVecI xaxis, IVecI yaxis, IVecI origin){ return pos.to2d(xaxis,yaxis,origin); } synchronized public IVec4 to4d(){ return pos.to4d(); } synchronized public IVec4 to4d(double w){ return pos.to4d(w); } synchronized public IVec4 to4d(IDoubleI w){ return pos.to4d(w); } synchronized public IDouble getX(){ return pos.getX(); } synchronized public IDouble getY(){ return pos.getY(); } synchronized public IDouble getZ(){ return pos.getZ(); } synchronized public IPoint set(IVecI v){ pos.set(v); return this; } synchronized public IPoint set(double x, double y, double z){ pos.set(x,y,z); return this;} synchronized public IPoint set(IDoubleI x, IDoubleI y, IDoubleI z){ pos.set(x,y,z); return this; } synchronized public IPoint add(double x, double y, double z){ pos.add(x,y,z); return this; } synchronized public IPoint add(IDoubleI x, IDoubleI y, IDoubleI z){ pos.add(x,y,z); return this; } synchronized public IPoint add(IVecI v){ pos.add(v); return this; } synchronized public IPoint sub(double x, double y, double z){ pos.sub(x,y,z); return this; } synchronized public IPoint sub(IDoubleI x, IDoubleI y, IDoubleI z){ pos.sub(x,y,z); return this; } synchronized public IPoint sub(IVecI v){ pos.sub(v); return this; } synchronized public IPoint mul(IDoubleI v){ pos.mul(v); return this; } synchronized public IPoint mul(double v){ pos.mul(v); return this; } synchronized public IPoint div(IDoubleI v){ pos.div(v); return this; } synchronized public IPoint div(double v){ pos.div(v); return this; } synchronized public IPoint neg(){ pos.neg(); return this; } synchronized public IPoint rev(){ return neg(); } synchronized public IPoint flip(){ return neg(); } synchronized public IPoint zero(){ pos.zero(); return this; } /** scale add */ synchronized public IPoint add(IVecI v, double f){ pos.add(v,f); return this; } synchronized public IPoint add(IVecI v, IDoubleI f){ pos.add(v,f); return this; } /** scale add alias */ synchronized public IPoint add(double f, IVecI v){ return add(v,f); } synchronized public IPoint add(IDoubleI f, IVecI v){ return add(v,f); } synchronized public double dot(IVecI v){ return pos.dot(v); } synchronized public double dot(double vx, double vy, double vz){ return pos.dot(vx,vy,vz); } synchronized public double dot(ISwitchE e, IVecI v){ return pos.dot(e,v); } synchronized public IDouble dot(ISwitchR r, IVecI v){ return pos.dot(r,v); } // creating IPoint is too much (in terms of memory occupancy) //synchronized public IPoint cross(IVecI v){ return dup().set(pos.cross(v)); } synchronized public IVec cross(IVecI v){ return pos.cross(v); } synchronized public IVec cross(double vx, double vy, double vz){ return pos.cross(vx,vy,vz); } synchronized public double len(){ return pos.len(); } synchronized public double len(ISwitchE e){ return pos.len(e); } synchronized public IDouble len(ISwitchR r){ return pos.len(r); } synchronized public double len2(){ return pos.len2(); } synchronized public double len2(ISwitchE e){ return pos.len2(e); } synchronized public IDouble len2(ISwitchR r){ return pos.len2(r); } synchronized public IPoint len(IDoubleI l){ pos.len(l); return this; } synchronized public IPoint len(double l){ pos.len(l); return this; } synchronized public IPoint unit(){ pos.unit(); return this; } synchronized public double dist(IVecI v){ return pos.dist(v); } synchronized public double dist(double vx, double vy, double vz){ return pos.dist(vx,vy,vz); } synchronized public double dist(ISwitchE e, IVecI v){ return pos.dist(e,v); } synchronized public IDouble dist(ISwitchR r, IVecI v){ return pos.dist(r,v); } synchronized public double dist2(IVecI v){ return pos.dist2(v); } synchronized public double dist2(double vx, double vy, double vz){ return pos.dist2(vx,vy,vz); } synchronized public double dist2(ISwitchE e, IVecI v){ return pos.dist2(e,v); } synchronized public IDouble dist2(ISwitchR r, IVecI v){ return pos.dist2(r,v); } synchronized public boolean eq(IVecI v){ return pos.eq(v); } synchronized public boolean eq(double vx, double vy, double vz){ return pos.eq(vx,vy,vz); } synchronized public boolean eq(ISwitchE e, IVecI v){ return pos.eq(e,v); } synchronized public IBool eq(ISwitchR r, IVecI v){ return pos.eq(r,v); } synchronized public boolean eq(IVecI v, double tolerance){ return pos.eq(v,tolerance); } synchronized public boolean eq(double vx, double vy, double vz, double tolerance){ return pos.eq(vx,vy,vz,tolerance); } synchronized public boolean eq(ISwitchE e, IVecI v, double tolerance){ return pos.eq(e,v,tolerance); } synchronized public IBool eq(ISwitchR r, IVecI v, IDoubleI tolerance){ return pos.eq(r,v,tolerance); } synchronized public boolean eqX(IVecI v){ return pos.eqX(v); } synchronized public boolean eqY(IVecI v){ return pos.eqY(v); } synchronized public boolean eqZ(IVecI v){ return pos.eqZ(v); } synchronized public boolean eqX(double vx){ return pos.eqX(vx); } synchronized public boolean eqY(double vy){ return pos.eqY(vy); } synchronized public boolean eqZ(double vz){ return pos.eqZ(vz); } synchronized public boolean eqX(ISwitchE e, IVecI v){ return pos.eqX(e,v); } synchronized public boolean eqY(ISwitchE e, IVecI v){ return pos.eqY(e,v); } synchronized public boolean eqZ(ISwitchE e, IVecI v){ return pos.eqZ(e,v); } synchronized public IBool eqX(ISwitchR r, IVecI v){ return pos.eqX(r,v); } synchronized public IBool eqY(ISwitchR r, IVecI v){ return pos.eqY(r,v); } synchronized public IBool eqZ(ISwitchR r, IVecI v){ return pos.eqZ(r,v); } synchronized public boolean eqX(IVecI v, double tolerance){ return pos.eqX(v,tolerance); } synchronized public boolean eqY(IVecI v, double tolerance){ return pos.eqY(v,tolerance); } synchronized public boolean eqZ(IVecI v, double tolerance){ return pos.eqZ(v,tolerance); } synchronized public boolean eqX(double vx, double tolerance){ return pos.eqX(vx,tolerance); } synchronized public boolean eqY(double vy, double tolerance){ return pos.eqY(vy,tolerance); } synchronized public boolean eqZ(double vz, double tolerance){ return pos.eqZ(vz,tolerance); } synchronized public boolean eqX(ISwitchE e, IVecI v, double tolerance){ return pos.eqX(e,v,tolerance); } synchronized public boolean eqY(ISwitchE e, IVecI v, double tolerance){ return pos.eqY(e,v,tolerance); } synchronized public boolean eqZ(ISwitchE e, IVecI v, double tolerance){ return pos.eqZ(e,v,tolerance); } synchronized public IBool eqX(ISwitchR r, IVecI v, IDoubleI tolerance){ return pos.eqX(r,v,tolerance); } synchronized public IBool eqY(ISwitchR r, IVecI v, IDoubleI tolerance){ return pos.eqY(r,v,tolerance); } synchronized public IBool eqZ(ISwitchR r, IVecI v, IDoubleI tolerance){ return pos.eqZ(r,v,tolerance); } synchronized public double angle(IVecI v){ return pos.angle(v); } synchronized public double angle(double vx, double vy, double vz){ return pos.angle(vx,vy,vz); } synchronized public double angle(ISwitchE e, IVecI v){ return pos.angle(e,v); } synchronized public IDouble angle(ISwitchR r, IVecI v){ return pos.angle(r,v); } synchronized public double angle(IVecI v, IVecI axis){ return pos.angle(v,axis); } synchronized public double angle(double vx, double vy, double vz, double axisX, double axisY, double axisZ){ return pos.angle(vx,vy,vz,axisX,axisY,axisZ); } synchronized public double angle(ISwitchE e, IVecI v, IVecI axis){ return pos.angle(e,v,axis); } synchronized public IDouble angle(ISwitchR r, IVecI v, IVecI axis){ return pos.angle(r,v,axis); } synchronized public IPoint rot(IDoubleI angle){ pos.rot(angle); return this; } synchronized public IPoint rot(double angle){ pos.rot(angle); return this; } synchronized public IPoint rot(IVecI axis, IDoubleI angle){ pos.rot(axis,angle); return this; } synchronized public IPoint rot(IVecI axis, double angle){ pos.rot(axis,angle); return this; } synchronized public IPoint rot(double axisX, double axisY, double axisZ, double angle){ pos.rot(axisX,axisY,axisZ,angle); return this; } synchronized public IPoint rot(IVecI center, IVecI axis, double angle){ pos.rot(center, axis,angle); return this; } synchronized public IPoint rot(double centerX, double centerY, double centerZ, double axisX, double axisY, double axisZ, double angle){ pos.rot(centerX, centerY, centerZ, axisX, axisY, axisZ, angle); return this; } synchronized public IPoint rot(IVecI center, IVecI axis, IDoubleI angle){ pos.rot(center, axis,angle); return this; } /** Rotate to destination direction vector. */ synchronized public IPoint rot(IVecI axis, IVecI destDir){ pos.rot(axis,destDir); return this; } /** Rotate to destination point location. */ synchronized public IPoint rot(IVecI center, IVecI axis, IVecI destPt){ pos.rot(center,axis,destPt); return this; } synchronized public IPoint rot2(IDoubleI angle){ pos.rot2(angle); return this; } synchronized public IPoint rot2(double angle){ pos.rot2(angle); return this; } synchronized public IPoint rot2(IVecI center, double angle){ pos.rot2(center, angle); return this; } synchronized public IPoint rot2(double centerX, double centerY, double angle){ pos.rot2(centerX, centerY, angle); return this; } synchronized public IPoint rot2(IVecI center, IDoubleI angle){ pos.rot2(center, angle); return this; } /** Rotate to destination direction vector. */ synchronized public IPoint rot2(IVecI destDir){ pos.rot2(destDir); return this; } /** Rotate to destination point location. */ synchronized public IPoint rot2(IVecI center, IVecI destPt){ pos.rot2(center,destPt); return this; } /** alias of mul */ synchronized public IPoint scale(IDoubleI f){ pos.scale(f); return this; } /** alias of mul */ synchronized public IPoint scale(double f){ pos.scale(f); return this; } synchronized public IPoint scale(IVecI center, IDoubleI f){ pos.scale(center,f); return this; } synchronized public IPoint scale(IVecI center, double f){ pos.scale(center,f); return this; } synchronized public IPoint scale(double centerX, double centerY, double centerZ, double f){ pos.scale(centerX, centerY, centerZ, f); return this; } /** scale only in 1 direction */ synchronized public IPoint scale1d(IVecI axis, double f){ pos.scale1d(axis,f); return this; } synchronized public IPoint scale1d(double axisX, double axisY, double axisZ, double f){ pos.scale1d(axisX,axisY,axisZ,f); return this; } synchronized public IPoint scale1d(IVecI axis, IDoubleI f){ pos.scale1d(axis,f); return this; } synchronized public IPoint scale1d(IVecI center, IVecI axis, double f){ pos.scale1d(center,axis,f); return this; } synchronized public IPoint scale1d(double centerX, double centerY, double centerZ, double axisX, double axisY, double axisZ, double f){ pos.scale1d(centerX,centerY,centerZ,axisX,axisY,axisZ,f); return this; } synchronized public IPoint scale1d(IVecI center, IVecI axis, IDoubleI f){ pos.scale1d(center,axis,f); return this; } /** reflect (mirror) 3 dimensionally to the other side of the plane */ synchronized public IPoint ref(IVecI planeDir){ pos.ref(planeDir); return this; } /** reflect (mirror) 3 dimensionally to the other side of the plane */ synchronized public IPoint ref(double planeX, double planeY, double planeZ){ pos.ref(planeX,planeY,planeZ); return this; } /** reflect (mirror) 3 dimensionally to the other side of the plane */ synchronized public IPoint ref(IVecI center, IVecI planeDir){ pos.ref(center,planeDir); return this; } /** reflect (mirror) 3 dimensionally to the other side of the plane */ synchronized public IPoint ref(double centerX, double centerY, double centerZ, double planeX, double planeY, double planeZ){ pos.ref(centerX,centerY,centerZ,planeX,planeY,planeZ); return this; } /** reflect (mirror) 3 dimensionally to the other side of the plane */ synchronized public IPoint mirror(IVecI planeDir){ pos.ref(planeDir); return this; } /** reflect (mirror) 3 dimensionally to the other side of the plane */ synchronized public IPoint mirror(double planeX, double planeY, double planeZ){ pos.ref(planeX,planeY,planeZ); return this; } /** reflect (mirror) 3 dimensionally to the other side of the plane */ synchronized public IPoint mirror(IVecI center, IVecI planeDir){ pos.ref(center,planeDir); return this; } /** reflect (mirror) 3 dimensionally to the other side of the plane */ synchronized public IPoint mirror(double centerX, double centerY, double centerZ, double planeX, double planeY, double planeZ){ pos.ref(centerX,centerY,centerZ,planeX,planeY,planeZ); return this; } /** shear operation */ synchronized public IPoint shear(double sxy, double syx, double syz, double szy, double szx, double sxz){ pos.shear(sxy,syx,syz,szy,szx,sxz); return this; } synchronized public IPoint shear(IDoubleI sxy, IDoubleI syx, IDoubleI syz, IDoubleI szy, IDoubleI szx, IDoubleI sxz){ pos.shear(sxy,syx,syz,szy,szx,sxz); return this; } synchronized public IPoint shear(IVecI center, double sxy, double syx, double syz, double szy, double szx, double sxz){ pos.shear(center,sxy,syx,syz,szy,szx,sxz); return this; } synchronized public IPoint shear(IVecI center, IDoubleI sxy, IDoubleI syx, IDoubleI syz, IDoubleI szy, IDoubleI szx, IDoubleI sxz){ pos.shear(center,sxy,syx,syz,szy,szx,sxz); return this; } synchronized public IPoint shearXY(double sxy, double syx){ pos.shearXY(sxy,syx); return this; } synchronized public IPoint shearXY(IDoubleI sxy, IDoubleI syx){ pos.shearXY(sxy,syx); return this; } synchronized public IPoint shearXY(IVecI center, double sxy, double syx){ pos.shearXY(center,sxy,syx); return this; } synchronized public IPoint shearXY(IVecI center, IDoubleI sxy, IDoubleI syx){ pos.shearXY(center,sxy,syx); return this; } synchronized public IPoint shearYZ(double syz, double szy){ pos.shearYZ(syz,szy); return this; } synchronized public IPoint shearYZ(IDoubleI syz, IDoubleI szy){ pos.shearYZ(syz,szy); return this; } synchronized public IPoint shearYZ(IVecI center, double syz, double szy){ pos.shearYZ(center,syz,szy); return this; } synchronized public IPoint shearYZ(IVecI center, IDoubleI syz, IDoubleI szy){ pos.shearYZ(center,syz,szy); return this; } synchronized public IPoint shearZX(double szx, double sxz){ pos.shearZX(szx,sxz); return this; } synchronized public IPoint shearZX(IDoubleI szx, IDoubleI sxz){ pos.shearZX(szx,sxz); return this; } synchronized public IPoint shearZX(IVecI center, double szx, double sxz){ pos.shearZX(center,szx,sxz); return this; } synchronized public IPoint shearZX(IVecI center, IDoubleI szx, IDoubleI sxz){ pos.shearZX(center,szx,sxz); return this; } /** translate is alias of add() */ synchronized public IPoint translate(double x, double y, double z){ pos.translate(x,y,z); return this; } synchronized public IPoint translate(IDoubleI x, IDoubleI y, IDoubleI z){ pos.translate(x,y,z); return this; } synchronized public IPoint translate(IVecI v){ pos.translate(v); return this; } synchronized public IPoint transform(IMatrix3I mat){ pos.transform(mat); return this; } synchronized public IPoint transform(IMatrix4I mat){ pos.transform(mat); return this; } synchronized public IPoint transform(IVecI xvec, IVecI yvec, IVecI zvec){ pos.transform(xvec,yvec,zvec); return this; } synchronized public IPoint transform(IVecI xvec, IVecI yvec, IVecI zvec, IVecI translate){ pos.transform(xvec,yvec,zvec,translate); return this; } /** mv() is alias of add() */ synchronized public IPoint mv(double x, double y, double z){ return add(x,y,z); } synchronized public IPoint mv(IDoubleI x, IDoubleI y, IDoubleI z){ return add(x,y,z); } synchronized public IPoint mv(IVecI v){ return add(v); } // method name cp() is used as getting control point method in curve and surface but here used also as copy because of the priority of variable fitting of diversed users' mind set over the clarity of the code organization /** cp() is alias of dup() */ synchronized public IPoint cp(){ return dup(); } /** cp() is alias of dup().add() */ synchronized public IPoint cp(double x, double y, double z){ return dup().add(x,y,z); } synchronized public IPoint cp(IDoubleI x, IDoubleI y, IDoubleI z){ return dup().add(x,y,z); } synchronized public IPoint cp(IVecI v){ return dup().add(v); } // methods creating new instance // returns IPoint?, not IVec? // returns IVec, not IPoint (2011/10/12) //synchronized public IPoint diff(IVecI v){ return dup().sub(v); } synchronized public IVec dif(IVecI v){ return pos.dif(v); } synchronized public IVec dif(double vx, double vy, double vz){ return pos.dif(vx,vy,vz); } synchronized public IVec diff(IVecI v){ return dif(v); } synchronized public IVec diff(double vx, double vy, double vz){ return dif(vx,vy,vz); } //synchronized public IPoint mid(IVecI v){ return dup().add(v).div(2); } synchronized public IVec mid(IVecI v){ return pos.mid(v); } synchronized public IVec mid(double vx, double vy, double vz){ return pos.mid(vx,vy,vz); } //synchronized public IPoint sum(IVecI v){ return dup().add(v); } synchronized public IVec sum(IVecI v){ return pos.sum(v); } synchronized public IVec sum(double vx, double vy, double vz){ return pos.sum(vx,vy,vz); } //synchronized public IPoint sum(IVecI... v){ IPoint ret = this.dup(); for(IVecI vi: v) ret.add(vi); return ret; } synchronized public IVec sum(IVecI... v){ return pos.sum(v); } //synchronized public IPoint bisect(IVecI v){ return dup().unit().add(v.dup().unit()); } synchronized public IVec bisect(IVecI v){ return pos.bisect(v); } synchronized public IVec bisect(double vx, double vy, double vz){ return pos.bisect(vx,vy,vz); } /** weighted sum. @return IVec */ //synchronized public IPoint sum(IVecI v2, double w1, double w2){ return dup().mul(w1).add(v2,w2); } synchronized public IVec sum(IVecI v2, double w1, double w2){ return pos.sum(v2,w1,w2); } //synchronized public IPoint sum(IVecI v2, double w2){ return dup().mul(1.0-w2).add(v2,w2); } synchronized public IVec sum(IVecI v2, double w2){ return pos.sum(v2,w2); } //synchronized public IPoint sum(IVecI v2, IDoubleI w1, IDoubleI w2){ return dup().mul(w1).add(v2,w2); } synchronized public IVec sum(IVecI v2, IDoubleI w1, IDoubleI w2){ return sum(v2,w1,w2); } //synchronized public IPoint sum(IVecI v2, IDoubleI w2){ return dup().mul(new IDouble(1.0).sub(w2)).add(v2,w2); } synchronized public IVec sum(IVecI v2, IDoubleI w2){ return sum(v2,w2); } /** alias of cross. (not unitized ... ?) */ //synchronized public IPoint nml(IVecI v){ return cross(v); } synchronized public IVec nml(IVecI v){ return pos.nml(v); } synchronized public IVec nml(double vx, double vy, double vz){ return pos.nml(vx,vy,vz); } /** create normal vector from 3 points of self, pt1 and pt2 */ //synchronized public IPoint nml(IVecI pt1, IVecI pt2){ return this.diff(pt1).cross(this.diff(pt2)).unit(); } synchronized public IVec nml(IVecI pt1, IVecI pt2){ return pos.nml(pt1,pt2); } synchronized public IVec nml(double vx1, double vy1, double vz1, double vx2, double vy2, double vz2){ return pos.nml(vx1,vy1,vz1,vx2,vy2,vz2); } /** checking x, y, and z is valid number (not Infinite, nor NaN). */ synchronized public boolean isValid(){ if(pos==null){ return false; } return pos.isValid(); } synchronized public String toString(){ if(pos==null) return super.toString(); return pos.toString(); } /** default setting in each object class; to be overridden in a child class */ public IAttribute defaultAttribute(){ IAttribute a = new IAttribute(); a.weight = IConfig.pointSize; return a; } /** set size of dot in graphic ; it's just alias of weight() */ synchronized public IPoint setSize(double sz){ return weight(sz); } synchronized public IPoint size(double sz){ return weight(sz); } /* synchronized public IPoint setSize(double sz){ return size(sz); } synchronized public IPoint size(double sz){ for(int i=0; graphics!=null && i<graphics.size(); i++) if(graphics.get(i) instanceof IPointGraphic) ((IPointGraphic)graphics.get(i)).size(sz); return this; } */ synchronized public double getSize(){ return size(); } public double size(){ if(graphics==null){ IOut.err("no graphics is set"); return -1; } for(int i=0; graphics!=null && i<graphics.size(); i++) if(graphics.get(i) instanceof IPointGraphic) return ((IPointGraphic)graphics.get(i)).size(); return -1; } synchronized public IPoint name(String nm){ super.name(nm); return this; } synchronized public IPoint layer(ILayer l){ super.layer(l); return this; } synchronized public IPoint layer(String l){ super.layer(l); return this; } synchronized public IPoint attr(IAttribute at){ super.attr(at); return this; } synchronized public IPoint hide(){ super.hide(); return this; } synchronized public IPoint show(){ super.show(); return this; } synchronized public IPoint clr(IColor c){ super.clr(c); return this; } synchronized public IPoint clr(IColor c, int alpha){ super.clr(c,alpha); return this; } synchronized public IPoint clr(IColor c, float alpha){ super.clr(c,alpha); return this; } synchronized public IPoint clr(IColor c, double alpha){ super.clr(c,alpha); return this; } synchronized public IPoint clr(IObject o){ super.clr(o); return this; } synchronized public IPoint clr(Color c){ super.clr(c); return this; } synchronized public IPoint clr(Color c, int alpha){ super.clr(c,alpha); return this; } synchronized public IPoint clr(Color c, float alpha){ super.clr(c,alpha); return this; } synchronized public IPoint clr(Color c, double alpha){ super.clr(c,alpha); return this; } synchronized public IPoint clr(int gray){ super.clr(gray); return this; } synchronized public IPoint clr(float fgray){ super.clr(fgray); return this; } synchronized public IPoint clr(double dgray){ super.clr(dgray); return this; } synchronized public IPoint clr(int gray, int alpha){ super.clr(gray,alpha); return this; } synchronized public IPoint clr(float fgray, float falpha){ super.clr(fgray,falpha); return this; } synchronized public IPoint clr(double dgray, double dalpha){ super.clr(dgray,dalpha); return this; } synchronized public IPoint clr(int r, int g, int b){ super.clr(r,g,b); return this; } synchronized public IPoint clr(float fr, float fg, float fb){ super.clr(fr,fg,fb); return this; } synchronized public IPoint clr(double dr, double dg, double db){ super.clr(dr,dg,db); return this; } synchronized public IPoint clr(int r, int g, int b, int a){ super.clr(r,g,b,a); return this; } synchronized public IPoint clr(float fr, float fg, float fb, float fa){ super.clr(fr,fg,fb,fa); return this; } synchronized public IPoint clr(double dr, double dg, double db, double da){ super.clr(dr,dg,db,da); return this; } synchronized public IPoint hsb(float h, float s, float b, float a){ super.hsb(h,s,b,a); return this; } synchronized public IPoint hsb(double h, double s, double b, double a){ super.hsb(h,s,b,a); return this; } synchronized public IPoint hsb(float h, float s, float b){ super.hsb(h,s,b); return this; } synchronized public IPoint hsb(double h, double s, double b){ super.hsb(h,s,b); return this; } synchronized public IPoint setColor(IColor c){ super.setColor(c); return this; } synchronized public IPoint setColor(IColor c, int alpha){ super.setColor(c,alpha); return this; } synchronized public IPoint setColor(IColor c, float alpha){ super.setColor(c,alpha); return this; } synchronized public IPoint setColor(IColor c, double alpha){ super.setColor(c,alpha); return this; } synchronized public IPoint setColor(Color c){ super.setColor(c); return this; } synchronized public IPoint setColor(Color c, int alpha){ super.setColor(c,alpha); return this; } synchronized public IPoint setColor(Color c, float alpha){ super.setColor(c,alpha); return this; } synchronized public IPoint setColor(Color c, double alpha){ super.setColor(c,alpha); return this; } synchronized public IPoint setColor(int gray){ super.setColor(gray); return this; } synchronized public IPoint setColor(float fgray){ super.setColor(fgray); return this; } synchronized public IPoint setColor(double dgray){ super.setColor(dgray); return this; } synchronized public IPoint setColor(int gray, int alpha){ super.setColor(gray,alpha); return this; } synchronized public IPoint setColor(float fgray, float falpha){ super.setColor(fgray,falpha); return this; } synchronized public IPoint setColor(double dgray, double dalpha){ super.setColor(dgray,dalpha); return this; } synchronized public IPoint setColor(int r, int g, int b){ super.setColor(r,g,b); return this; } synchronized public IPoint setColor(float fr, float fg, float fb){ super.setColor(fr,fg,fb); return this; } synchronized public IPoint setColor(double dr, double dg, double db){ super.setColor(dr,dg,db); return this; } synchronized public IPoint setColor(int r, int g, int b, int a){ super.setColor(r,g,b,a); return this; } synchronized public IPoint setColor(float fr, float fg, float fb, float fa){ super.setColor(fr,fg,fb,fa); return this; } synchronized public IPoint setColor(double dr, double dg, double db, double da){ super.setColor(dr,dg,db,da); return this; } synchronized public IPoint setHSBColor(float h, float s, float b, float a){ super.setHSBColor(h,s,b,a); return this; } synchronized public IPoint setHSBColor(double h, double s, double b, double a){ super.setHSBColor(h,s,b,a); return this; } synchronized public IPoint setHSBColor(float h, float s, float b){ super.setHSBColor(h,s,b); return this; } synchronized public IPoint setHSBColor(double h, double s, double b){ super.setHSBColor(h,s,b); return this; } synchronized public IPoint weight(double w){ super.weight(w); return this; } synchronized public IPoint weight(float w){ super.weight(w); return this; } }
#ifndef <API key> #define <API key> #include "ec2request_p.h" #include "<API key>.h" namespace QtAws { namespace EC2 { class <API key>; class <API key> : public Ec2RequestPrivate { public: <API key>(const Ec2Request::Action action, <API key> * const q); <API key>(const <API key> &other, <API key> * const q); private: Q_DECLARE_PUBLIC(<API key>) }; } // namespace EC2 } // namespace QtAws #endif
<?php namespace <API key>\DcGeneral\Data; /** * This class is the base implementation for <API key>. */ class <API key> implements <API key> { /** * The language information stored in this collection. * * @var <API key>[] */ protected $languages = []; /** * {@inheritDoc} */ public function add(<API key> $language) { $this->languages[] = $language; return $this; } /** * Get a iterator for this collection. * * @return \ArrayIterator */ public function getIterator() { return new \ArrayIterator($this->languages); } /** * Count the contained language information. * * @return int */ public function count() { return \count($this->languages); } }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Test 6</title> <script src="sxz.js"></script> </head> <body> <img src="lena_std.jpg" align="left" alt="original image" /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <canvas id="canvasid" width="512" height="512"></canvas> <script> var canvas = document.getElementById('canvasid'); var sxz = new Sxz(); sxz.Load(sxz, "lena_std.sxz", canvas, Render); function Render(sxz) { sxz.Render(); } </script> </body> </html>
using System; namespace jp.nyatla.nyartoolkit.cs.core { public interface <API key> { /** * * @param i_in * * @param o_out * */ void ideal2Observ(NyARDoublePoint2d i_in, NyARDoublePoint2d o_out); /** * * @param i_in * * @param o_out * */ void ideal2Observ(NyARDoublePoint2d i_in, NyARIntPoint2d o_out); /** * * @param i_in * * @param o_out * */ void ideal2Observ(double i_x, double i_y, NyARDoublePoint2d o_out); /** * * @param i_x * * @param i_y * * @param o_out * */ void ideal2Observ(double i_x, double i_y, NyARIntPoint2d o_out); /** * * i_ino_out * @param i_in * * @param o_out * * @param i_size * */ void ideal2ObservBatch(NyARDoublePoint2d[] i_in, NyARDoublePoint2d[] o_out, int i_size); /** * * i_ino_out * @param i_in * * @param o_out * * @param i_size * */ void ideal2ObservBatch(NyARDoublePoint2d[] i_in, NyARIntPoint2d[] o_out, int i_size); /** * * @param ix * * @param iy * * @param o_point * */ void observ2Ideal(double ix, double iy, NyARDoublePoint2d o_point); /** * {@link #observ2Ideal(double, double, NyARDoublePoint2d)} * i_ino_point * @param i_in * @param o_point */ void observ2Ideal(NyARDoublePoint2d i_in, NyARDoublePoint2d o_point); /** * * * @param ix * * @param iy * * @param o_point * */ void observ2Ideal(int ix, int iy, NyARDoublePoint2d o_point); /** * {@link #observ2Ideal(double, double, NyARDoublePoint2d)} * @param i_in * @param o_out * @param i_size */ void observ2IdealBatch(NyARDoublePoint2d[] i_in, NyARDoublePoint2d[] o_out, int i_size); void observ2IdealBatch(NyARIntPoint2d[] i_in, NyARDoublePoint2d[] o_out, int i_size); } }
#include <dirent.h> #include <r_core.h> #include <r_lib.h> #include <yara.h> #undef R_API #define R_API static #undef R_IPI #define R_IPI static // true if the plugin has been initialized. static int initialized = false; static bool print_strings = 0; static unsigned int flagidx = 0; static bool io_va = true; #if YR_MAJOR_VERSION < 4 static int callback(int message, void* rule, void* data); #else static int callback(YR_SCAN_CONTEXT* context, int message, void* rule, void* data); #endif static int r_cmd_yara_add (const RCore* core, const char* input); static int r_cmd_yara_add_file (const char* rules_path); static int r_cmd_yara_call(void *user, const char *input); static int r_cmd_yara_clear(); static int r_cmd_yara_init(void *user, const char *cmd); static int r_cmd_yara_help(const RCore* core); static int r_cmd_yara_process(const RCore* core, const char* input); static int r_cmd_yara_scan(const RCore* core, const char* option); static int <API key> (const RCore* core); static const char* yara_rule_template = "rule RULE_NAME {\n\tstrings:\n\n\tcondition:\n}"; /* Because of how the rules are compiled, we are not allowed to add more * rules to a compiler once it has compiled. That's why we keep a list * of those compiled rules. */ static RList* rules_list; #if YR_MAJOR_VERSION < 4 static int callback (int message, void *msg_data, void *user_data) { RCore *core = (RCore *) user_data; RPrint *print = core->print; unsigned int ruleidx; st64 offset = 0; ut64 n = 0; YR_RULE* rule = msg_data; if (message == <API key>) { YR_STRING* string; r_cons_printf("%s\n", rule->identifier); ruleidx = 0; <API key>(rule, string) { YR_MATCH* match; <API key>(string, match) { n = match->base + match->offset; // Find virtual address if needed if (io_va) { RIOMap *map = r_io_map_get_paddr (core->io, n); if (map) { offset = r_io_map_begin (map) - map->delta; } } const char *flag = sdb_fmt ("%s%d_%s_%d", "yara", flagidx, rule->identifier, ruleidx); if (print_strings) { r_cons_printf("0x%08" PFMT64x ": %s : ", n + offset, flag); r_print_bytes(print, match->data, match->data_length, "%02x"); } r_flag_set (core->flags, flag, n + offset, match->data_length); ruleidx++; } } flagidx++; } return CALLBACK_CONTINUE; } static void compiler_callback(int error_level, const char* file_name, int line_number, const char* message, void* user_data) { eprintf ("file: %s line_number: %d.\n%s", file_name, line_number, message); return; } #else static int callback (YR_SCAN_CONTEXT* context, int message, void *msg_data, void *user_data) { RCore *core = (RCore *) user_data; RPrint *print = core->print; unsigned int ruleidx; st64 offset = 0; ut64 n = 0; YR_RULE* rule = msg_data; if (message == <API key>) { YR_STRING* string; r_cons_printf("%s\n", rule->identifier); ruleidx = 0; <API key>(rule, string) { YR_MATCH* match; <API key>(context, string, match) { n = match->base + match->offset; // Find virtual address if needed if (io_va) { RIOMap *map = r_io_map_get_paddr (core->io, n); if (map) { offset = r_io_map_begin (map) - map->delta; } } const char *flag = sdb_fmt ("%s%d_%s_%d", "yara", flagidx, rule->identifier, ruleidx); if (print_strings) { r_cons_printf("0x%08" PFMT64x ": %s : ", n + offset, flag); r_print_bytes(print, match->data, match->data_length, "%02x"); } r_flag_set (core->flags, flag, n + offset, match->data_length); ruleidx++; } } flagidx++; } return CALLBACK_CONTINUE; } static void compiler_callback(int error_level, const char* file_name, int line_number, const struct YR_RULE *rule, const char* message, void* user_data) { eprintf ("file: %s line_number: %d.\n%s", file_name, line_number, message); return; } #endif static int r_cmd_yara_scan(const RCore* core, const char* option) { RListIter* rules_it; YR_RULES* rules; void* to_scan; int result; r_flag_space_push (core->flags, "yara"); const unsigned int to_scan_size = r_io_size (core->io); io_va = r_config_get_b (core->config, "io.va"); if (to_scan_size < 1) { eprintf ("Invalid file size\n"); return false; } if( *option == '\0') { print_strings = 0; } else if (*option == 'S') { print_strings = 1; } else { print_strings = 0; eprintf ("Invalid option\n"); return false; } to_scan = malloc (to_scan_size); if (!to_scan) { eprintf ("Something went wrong during memory allocation\n"); return false; } result = r_io_pread_at (core->io, 0L, to_scan, to_scan_size); if (!result) { eprintf ("Something went wrong during r_io_read_at\n"); free (to_scan); return false; } r_list_foreach (rules_list, rules_it, rules) { yr_rules_scan_mem (rules, to_scan, to_scan_size, 0, callback, (void *)core, 0); } free (to_scan); return true; } static int r_cmd_yara_show(const char * name) { /* List loaded rules containing name */ RListIter* rules_it; YR_RULES* rules; YR_RULE* rule; r_list_foreach (rules_list, rules_it, rules) { yr_rules_foreach (rules, rule) { if (r_str_casestr (rule->identifier, name)) { r_cons_printf ("%s\n", rule->identifier); } } } return true; } static int r_cmd_yara_tags() { /* List tags from all the different loaded rules */ RListIter* rules_it; RListIter *tags_it; YR_RULES* rules; YR_RULE* rule; const char* tag_name; RList *tag_list = r_list_new(); tag_list->free = free; r_list_foreach (rules_list, rules_it, rules) { yr_rules_foreach(rules, rule) { <API key>(rule, tag_name) { if (! r_list_find (tag_list, tag_name, (RListComparator)strcmp)) { r_list_add_sorted (tag_list, strdup (tag_name), (RListComparator)strcmp); } } } } r_cons_printf ("[YARA tags]\n"); r_list_foreach (tag_list, tags_it, tag_name) { r_cons_printf ("%s\n", tag_name); } r_list_free (tag_list); return true; } static int r_cmd_yara_tag (const char * search_tag) { /* List rules with tag search_tag */ RListIter* rules_it; YR_RULES* rules; YR_RULE* rule; const char* tag_name; r_list_foreach (rules_list, rules_it, rules) { yr_rules_foreach (rules, rule) { <API key>(rule, tag_name) {eprintf ("Invalid option\n"); if (r_str_casestr (tag_name, search_tag)) { r_cons_printf("%s\n", rule->identifier); break; } } } } return true; } static int r_cmd_yara_list () { /* List all loaded rules */ RListIter* rules_it; YR_RULES* rules; YR_RULE* rule; r_list_foreach (rules_list, rules_it, rules) { yr_rules_foreach (rules, rule) { r_cons_printf("%s\n", rule->identifier); } } return true; } static int r_cmd_yara_clear () { /* Clears all loaded rules */ r_list_free (rules_list); rules_list = r_list_newf((RListFree) yr_rules_destroy); eprintf ("Rules cleared.\n"); return true; } static int r_cmd_yara_add(const RCore* core, const char* input) { /* Add a rule with user input */ YR_COMPILER* compiler = NULL; char* modified_template = NULL; char* old_template = NULL; int result, i, continue_edit; for( i = 0; input[i] != '\0'; i++) { if (input[i] != ' ') { return r_cmd_yara_add_file (input + i); } } if (yr_compiler_create (&compiler) != ERROR_SUCCESS) { char buf[64]; eprintf ("Error: %s\n", <API key> (compiler, buf, sizeof (buf))); return false; } old_template = strdup(yara_rule_template); do { modified_template = r_core_editor (core, NULL, old_template); free(old_template); old_template = NULL; if (!modified_template) { eprintf("Something happened with the temp file"); goto err_exit; } result = <API key> (compiler, modified_template, NULL); if( result > 0 ) { char buf[64]; eprintf ("Error: %s\n", <API key> (compiler, buf, sizeof (buf))); continue_edit = r_cons_yesno('y', "Do you want to continue editing the rule? [y]/n\n"); if (!continue_edit) { goto err_exit; } old_template = modified_template; modified_template = NULL; } } while (result > 0); free(modified_template); yr_compiler_destroy (compiler); r_cons_printf ("Rule successfully added.\n"); return true; err_exit: if (compiler) yr_compiler_destroy (compiler); if (modified_template) free (modified_template); if (old_template) free (old_template); return false; } static int r_cmd_yara_add_file(const char* rules_path) { YR_COMPILER* compiler = NULL; YR_RULES* rules; FILE* rules_file = NULL; int result; if (!rules_path) { eprintf ("Please tell me what am I supposed to load\n"); return false; } rules_file = r_sandbox_fopen (rules_path, "r"); if (!rules_file) { eprintf ("Unable to open %s\n", rules_path); return false; } if (yr_compiler_create (&compiler) != ERROR_SUCCESS) { char buf[64]; eprintf ("Error: %s\n", <API key> (compiler, buf, sizeof (buf))); goto err_exit; } result = <API key> (compiler, rules_file, NULL, rules_path); fclose (rules_file); rules_file = NULL; if (result > 0) { char buf[64]; eprintf ("Error: %s : %s\n", <API key> (compiler, buf, sizeof (buf)), rules_path); goto err_exit; } if (<API key> (compiler, &rules) != ERROR_SUCCESS) { char buf[64]; eprintf ("Error: %s\n", <API key> (compiler, buf, sizeof (buf))); goto err_exit; } r_list_append(rules_list, rules); yr_compiler_destroy (compiler); return true; err_exit: if (compiler) yr_compiler_destroy (compiler); if (rules_file) fclose (rules_file); return false; } static int r_cmd_yara_help(const RCore* core) { const char * help_message[] = { "Usage: yara", "", " Yara plugin", "add", " [file]", "Add yara rules from file, or open $EDITOR with yara rule template", "clear", "", "Clear all rules", "help", "", "Show this help", "list", "", "List all rules", "scan", "[S]", "Scan the current file, if S option is given it prints matching strings.", "show", " name", "Show rules containing name", "tag", " name", "List rules with tag 'name'", "tags", "", "List tags from the loaded rules", NULL }; r_core_cmd_help (core, help_message); return true; } static int r_cmd_yara_process(const RCore* core, const char* input) { if (!strncmp (input, "add", 3)) return r_cmd_yara_add (core, input + 3); else if (!strncmp (input, "clear", 4)) return r_cmd_yara_clear (); else if (!strncmp (input, "list", 4)) return r_cmd_yara_list (); else if (!strncmp (input, "scan", 4)) return r_cmd_yara_scan (core, input + 4); else if (!strncmp (input, "show", 4)) return r_cmd_yara_show (input + 5); else if (!strncmp (input, "tags", 4)) return r_cmd_yara_tags (); else if (!strncmp (input, "tag ", 4)) return r_cmd_yara_tag (input + 4); else return r_cmd_yara_help (core); } static int r_cmd_yara_call(void *user, const char *input) { const char *args; RCore* core = (RCore*) user; if (strncmp (input, "yara", 4)) { return false; } if (strncmp (input, "yara ", 5)) { return r_cmd_yara_help (core); } args = input + 4; if (! initialized && !r_cmd_yara_init (core, NULL)) { return false; } if (*args) { args++; } r_cmd_yara_process (core, args); return true; } static int <API key> (const RCore* core) { RListIter* iter = NULL; YR_COMPILER* compiler = NULL; YR_RULES* yr_rules; char* filename, *complete_path; char* rules = NULL; char* y3_rule_dir = r_str_newf ("%s%s%s", r_str_home(R2_HOME_PLUGINS), R_SYS_DIR, "rules-yara3"); RList* list = r_sys_dir (y3_rule_dir); if (yr_compiler_create (&compiler) != ERROR_SUCCESS) { char buf[64]; eprintf ("Error: %s\n", <API key> (compiler, buf, sizeof (buf))); goto err_exit; } <API key>(compiler, compiler_callback, NULL); r_list_foreach (list, iter, filename) { if (filename[0] != '.') { // skip '.', '..' and hidden files complete_path = r_str_newf ("%s%s%s", y3_rule_dir, R_SYS_DIR, filename); rules = (char*)r_file_gzslurp (complete_path, NULL, true); free (complete_path); complete_path = NULL; if (<API key> (compiler, rules, NULL) > 0) { char buf[64]; eprintf ("Error: %s\n", <API key> (compiler, buf, sizeof (buf))); } free (rules); rules = NULL; } } r_list_free (list); if (<API key> (compiler, &yr_rules) != ERROR_SUCCESS) { char buf[64]; eprintf ("Error: %s\n", <API key> (compiler, buf, sizeof (buf))); goto err_exit; } r_list_append(rules_list, yr_rules); yr_compiler_destroy (compiler); return true; err_exit: if (y3_rule_dir) free (y3_rule_dir); if (compiler) yr_compiler_destroy (compiler); if (list) r_list_free (list); if (rules) free (rules); return false; } static int r_cmd_yara_init(void *user, const char *cmd) { RCore* core = (RCore *)user; rules_list = r_list_newf((RListFree) yr_rules_destroy); yr_initialize (); <API key> (core); initialized = true; flagidx = 0; return true; } static int r_cmd_yara_fini(){ if (initialized) { r_list_free (rules_list); yr_finalize(); initialized = false; } return true; } RCorePlugin r_core_plugin_yara = { .name = "yara", .desc = "YARA integration", .license = "LGPL", .call = r_cmd_yara_call, .init = r_cmd_yara_init, .fini = r_cmd_yara_fini }; #ifndef CORELIB RLibStruct radare_plugin = { .type = R_LIB_TYPE_CORE, .data = &r_core_plugin_yara, .version = R2_VERSION }; #endif
# Change Log All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] Added - Added support for decoding HTML entities (<API key>()) (2018-09-28). - Added serialisation through the [cereal](http://uscilab.github.io/cereal/index.html) C++ library. Library headers have been copied to src/CDM/cereal (2017-02-26). - Added UNICODE normalisation (NFC) through boost::locale. - Changed unsigned long to uint32\_t. - Allowed Tcl functions \(tip\_\*\) to accept either CDM objects wrapped as Tcl value objects, or as SWIG objects. For example, all "tip\_GetType [CDM::Annotation -args token]", "tip\_GetType [CDM::Annotation ann token]" and "tip\_GetType {{} token {} {}}" are valid. Changed Deprecated Removed Fixed Security
package org.yawlfoundation.yawl.worklet.client; import org.yawlfoundation.yawl.editor.ui.specification.SpecificationModel; import org.yawlfoundation.yawl.engine.YSpecificationID; import java.io.IOException; import java.util.Map; /** * @author Michael Adams * @date 18/02/2016 */ public class TaskIDChangeMap { private Map<String, String> _changedIdentifiers; public TaskIDChangeMap(Map<String, String> changeMap) { _changedIdentifiers = changeMap; } public String getID(String oldID) { String newID = _changedIdentifiers.get(oldID); return newID != null ? newID : oldID; } public String getOldID(String newID) { for (String oldID : _changedIdentifiers.keySet()) { if (_changedIdentifiers.get(oldID).equals(newID)) { return oldID; } } return newID; } // called when a user changes a taskID public void add(String oldID, String newID) { // need to handle the case where this id has been updated // more than once between saves _changedIdentifiers.put(getOldID(oldID), newID); } public void saveChanges() { if (! _changedIdentifiers.isEmpty()) { YSpecificationID specID = SpecificationModel.getHandler(). getSpecification().getSpecificationID(); try { if (WorkletClient.getInstance().updateRdrSetTaskIDs(specID, _changedIdentifiers)) { _changedIdentifiers.clear(); } } catch (IOException ignore) { } } } }
<API key> = Lair:new { mobiles = {}, spawnLimit = 15, buildingsVeryEasy = {}, buildingsEasy = {}, buildingsMedium = {}, buildingsHard = {}, buildingsVeryHard = {}, } addLairTemplate("<API key>", <API key>)
// This code contains NVIDIA Confidential Information and is disclosed to you // Notice // NVIDIA Corporation and its licensors retain all intellectual property and // any modifications thereto. Any use, reproduction, disclosure, or // distribution of this software and related documentation without an express // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. // Information and code furnished is believed to be accurate and reliable. // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such // information or for any infringement of patents or other rights of third parties that may // or patent rights of NVIDIA Corporation. Details are subject to change without notice. // This code supersedes and replaces all information previously supplied. // NVIDIA Corporation products are not authorized for use as critical // components in life support devices or systems without express written approval of // NVIDIA Corporation. #ifndef <API key> #define <API key> #include "PxPvdClient.h" #include "PsHashMap.h" #include "PsMutex.h" #include "PsBroadcast.h" #include "<API key>.h" #include "PxProfileMemory.h" namespace physx { class PvdDataStream; namespace pvdsdk { class PvdImpl; class PvdMemClient : public PvdClient, public profile::<API key>, public shdfnd::UserAllocated { PX_NOCOPY(PvdMemClient) public: PvdMemClient(PvdImpl& pvd); virtual ~PvdMemClient(); bool isConnected() const; void onPvdConnected(); void onPvdDisconnected(); void flush(); PvdDataStream* getDataStream(); PvdUserRenderer* getUserRender(); // memory event void onAllocation(size_t size, const char* typeName, const char* filename, int line, void* allocatedMemory); void onDeallocation(void* addr); private: PvdImpl& mSDKPvd; PvdDataStream* mPvdDataStream; bool mIsConnected; // mem profile shdfnd::Mutex mMutex; // mem onallocation can called from different threads profile::<API key>& mMemEventBuffer; void handleBufferFlush(const uint8_t* inData, uint32_t inLength); void handleClientRemoved(); }; } // namespace pvdsdk } // namespace physx #endif // <API key>
/** * @class graphiti.Connection * A Connection is the line between two {@link graphiti.Port}s. * * @inheritable * @author Andreas Herz * @extends graphiti.shape.basic.Line */ graphiti.Connection = graphiti.shape.basic.PolyLine.extend({ NAME : "graphiti.Connection", DEFAULT_ROUTER: new graphiti.layout.connection.DirectRouter(), //DEFAULT_ROUTER: new graphiti.layout.connection.<API key>(), //DEFAULT_ROUTER: new graphiti.layout.connection.<API key>(), //DEFAULT_ROUTER: new graphiti.layout.connection.ConnectionRouter(), /** * @constructor * Creates a new figure element which are not assigned to any canvas. */ init: function() { this._super(); this.sourcePort = null; this.targetPort = null; this.oldPoint=null; this.sourceDecorator = null; /*:graphiti.ConnectionDecorator*/ this.targetDecorator = null; /*:graphiti.ConnectionDecorator*/ // decoration of the polyline this.startDecoSet = null; this.endDecoSet=null; this.regulated = false; this.draggable = false; this.selectable = false; //this.Activator = new g.Buttons.Activate(); //this.Repressor = new g.Buttons.Inhibit(); //this.remove = new g.Buttons.Remove(); //this.addFigure(this.remove, new graphiti.layout.locator.ConnectionLocator()); this.sourceAnchor = new graphiti.ConnectionAnchor(this); this.targetAnchor = new graphiti.ConnectionAnchor(this); this.router = this.DEFAULT_ROUTER; this.setColor("#4cbf2f"); this.setStroke(3); }, /** * @private **/ disconnect : function() { if (this.sourcePort !== null) { this.sourcePort.detachMoveListener(this); this.<API key>(); } if (this.targetPort !== null) { this.targetPort.detachMoveListener(this); this.<API key>(); } }, /** * @private **/ reconnect : function() { if (this.sourcePort !== null) { this.sourcePort.attachMoveListener(this); this.<API key>(); } if (this.targetPort !== null) { this.targetPort.attachMoveListener(this); this.<API key>(); } this.routingRequired =true; this.repaint(); }, /** * You can't drag&drop the resize handles of a connector. * @type boolean **/ isResizeable : function() { return this.isDraggable(); }, /** * @method * Add a child figure to the Connection. The hands over figure doesn't support drag&drop * operations. It's only a decorator for the connection.<br> * Mainly for labels or other fancy decorations :-) * * @param {graphiti.Figure} figure the figure to add as decoration to the connection. * @param {graphiti.layout.locator.ConnectionLocator} locator the locator for the child. **/ addFigure : function(child, locator) { // just to ensure the right interface for the locator. // The base class needs only 'graphiti.layout.locator.Locator'. if(!(locator instanceof graphiti.layout.locator.ConnectionLocator)){ throw "Locator must implement the class graphiti.layout.locator.ConnectionLocator"; } this._super(child, locator); }, /** * @method * Set the ConnectionDecorator for this object. * * @param {graphiti.decoration.connection.Decorator} the new source decorator for the connection **/ setSourceDecorator:function( decorator) { this.sourceDecorator = decorator; this.routingRequired = true; this.repaint(); }, /** * @method * Get the current source ConnectionDecorator for this object. * * @type graphiti.ConnectionDecorator **/ getSourceDecorator:function() { return this.sourceDecorator; }, /** * @method * Set the ConnectionDecorator for this object. * * @param {graphiti.decoration.connection.Decorator} the new target decorator for the connection **/ setTargetDecorator:function( decorator) { this.targetDecorator = decorator; this.routingRequired =true; this.repaint(); }, /** * @method * Get the current target ConnectionDecorator for this object. * * @type graphiti.ConnectionDecorator **/ getTargetDecorator:function() { return this.targetDecorator; }, /** * @method * Set the ConnectionAnchor for this object. An anchor is responsible for the endpoint calculation * of an connection. * * @param {graphiti.ConnectionAnchor} the new source anchor for the connection **/ setSourceAnchor:function(/*:graphiti.ConnectionAnchor*/ anchor) { this.sourceAnchor = anchor; this.sourceAnchor.setOwner(this.sourcePort); this.routingRequired =true; this.repaint(); }, /** * @method * Set the ConnectionAnchor for this object. * * @param {graphiti.ConnectionAnchor} the new target anchor for the connection **/ setTargetAnchor:function(/*:graphiti.ConnectionAnchor*/ anchor) { this.targetAnchor = anchor; this.targetAnchor.setOwner(this.targetPort); this.routingRequired =true; this.repaint(); }, /** * @method * Set the ConnectionRouter. * **/ setRouter:function(/*:graphiti.ConnectionRouter*/ router) { if(router !==null){ this.router = router; } else{ this.router = new graphiti.layout.connection.NullRouter(); } this.routingRequired =true; // repaint the connection with the new router this.repaint(); }, /** * @method * Return the current active router of this connection. * * @type graphiti.ConnectionRouter **/ getRouter:function() { return this.router; }, /** * @method * Calculate the path of the polyline * * @private */ calculatePath: function(){ if(this.sourcePort===null || this.targetPort===null){ return; } this._super(); }, /** * @private **/ repaint:function(attributes) { if(this.repaintBlocked===true || this.shape===null){ return; } if(this.sourcePort===null || this.targetPort===null){ return; } this._super(attributes); // paint the decorator if any exists if(this.getSource().getParent().isMoving===false && this.getTarget().getParent().isMoving===false ) { if(this.targetDecorator!==null && this.endDecoSet===null){ this.endDecoSet= this.targetDecorator.paint(this.getCanvas().paper); } if(this.sourceDecorator!==null && this.startDecoSet===null){ this.startDecoSet= this.sourceDecorator.paint(this.getCanvas().paper); } } // translate/transform the decorations to the end/start of the connection // and rotate them as well if(this.startDecoSet!==null){ this.startDecoSet.transform("r"+this.getStartAngle()+"," + this.getStartX() + "," + this.getStartY()+" t" + this.getStartX() + "," + this.getStartY()); } if(this.endDecoSet!==null){ this.endDecoSet.transform("r"+this.getEndAngle()+"," + this.getEndX() + "," + this.getEndY()+" t" + this.getEndX() + "," + this.getEndY()); } }, postProcess: function(postPorcessCache){ this.router.postProcess(this, this.getCanvas(), postPorcessCache); }, /** * @method * Called by the framework during drag&drop operations. * * @param {graphiti.Figure} draggedFigure The figure which is currently dragging * * @return {Boolean} true if this port accepts the dragging port for a drop operation * @template **/ onDragEnter : function( draggedFigure ) { this.setGlow(true); return true; }, /** * @method * Called if the DragDrop object leaving the current hover figure. * * @param {graphiti.Figure} draggedFigure The figure which is currently dragging * @template **/ onDragLeave:function( draggedFigure ) { this.setGlow(false); }, /** * Return the recalculated position of the start point if we have set an anchor. * * @return graphiti.geo.Point **/ getStartPoint:function() { if(this.isMoving===false){ return this.sourceAnchor.getLocation(this.targetAnchor.getReferencePoint()); } else{ return this._super(); } }, /** * Return the recalculated position of the start point if we have set an anchor. * * @return graphiti.geo.Point **/ getEndPoint:function() { if(this.isMoving===false){ return this.targetAnchor.getLocation(this.sourceAnchor.getReferencePoint()); } else{ return this._super(); } }, /** * @method * Set the new source port of this connection. This enforce a repaint of the connection. * * @param {graphiti.Port} port The new source port of this connection. * **/ setSource:function( port) { if(this.sourcePort!==null){ this.sourcePort.detachMoveListener(this); } this.sourcePort = port; if(this.sourcePort===null){ return; } this.routingRequired = true; this.sourceAnchor.setOwner(this.sourcePort); this.<API key>(); this.sourcePort.attachMoveListener(this); this.setStartPoint(port.getAbsoluteX(), port.getAbsoluteY()); }, /** * @method * Returns the source port of this connection. * * @type graphiti.Port **/ getSource:function() { return this.sourcePort; }, /** * @method * Set the target port of this connection. This enforce a repaint of the connection. * * @param {graphiti.Port} port The new target port of this connection **/ setTarget:function( port) { if(this.targetPort!==null){ this.targetPort.detachMoveListener(this); } this.targetPort = port; if(this.targetPort===null){ return; } this.routingRequired = true; this.targetAnchor.setOwner(this.targetPort); this.<API key>(); this.targetPort.attachMoveListener(this); this.setEndPoint(port.getAbsoluteX(), port.getAbsoluteY()); }, /** * @method * Returns the target port of this connection. * * @type graphiti.Port **/ getTarget:function() { return this.targetPort; }, <API key>:function(/*:graphiti.Figure*/ figure) { if(figure===this.sourcePort){ this.setStartPoint(this.sourcePort.getAbsoluteX(), this.sourcePort.getAbsoluteY()); } else{ this.setEndPoint(this.targetPort.getAbsoluteX(), this.targetPort.getAbsoluteY()); } this._super(figure); }, /** * Returns the angle of the connection at the output port (source) * **/ getStartAngle:function() { // return a good default value if the connection is not routed at the // moment if( this.lineSegments.getSize()===0){ return 0; } var p1 = this.lineSegments.get(0).start; var p2 = this.lineSegments.get(0).end; // if(this.router instanceof graphiti.layout.connection.<API key>) // p2 = this.lineSegments.get(5).end; var length = Math.sqrt((p1.x-p2.x)*(p1.x-p2.x)+(p1.y-p2.y)*(p1.y-p2.y)); var angle = -(180/Math.PI) *Math.asin((p1.y-p2.y)/length); if(angle<0) { if(p2.x<p1.x){ angle = Math.abs(angle) + 180; } else{ angle = 360- Math.abs(angle); } } else { if(p2.x<p1.x){ angle = 180-angle; } } return angle; }, getEndAngle:function() { // return a good default value if the connection is not routed at the // moment if (this.lineSegments.getSize() === 0) { return 90; } var p1 = this.lineSegments.get(this.lineSegments.getSize()-1).end; var p2 = this.lineSegments.get(this.lineSegments.getSize()-1).start; // if(this.router instanceof graphiti.layout.connection.<API key>) // p2 = this.lineSegments.get(this.lineSegments.getSize()-5).end; var length = Math.sqrt((p1.x-p2.x)*(p1.x-p2.x)+(p1.y-p2.y)*(p1.y-p2.y)); var angle = -(180/Math.PI) *Math.asin((p1.y-p2.y)/length); if(angle<0) { if(p2.x<p1.x){ angle = Math.abs(angle) + 180; } else{ angle = 360- Math.abs(angle); } } else { if(p2.x<p1.x){ angle = 180-angle; } } return angle; }, /** * @private **/ <API key>:function() { // enforce a repaint of all connections which are related to this port // this is required for a "FanConnectionRouter" or "<API key>" var connections = this.sourcePort.getConnections(); for(var i=0; i<connections.getSize();i++) { connections.get(i).repaint(); } }, /** * @private **/ <API key>:function() { // enforce a repaint of all connections which are related to this port // this is required for a "FanConnectionRouter" or "<API key>" var connections = this.targetPort.getConnections(); for(var i=0; i<connections.getSize();i++) { connections.get(i).repaint(); } }, /** * @method * Returns the Command to perform the specified Request or null. * * @param {graphiti.command.CommandType} request describes the Command being requested * @return {graphiti.command.Command} null or a Command **/ createCommand:function( request) { if(request.getPolicy() === graphiti.command.CommandType.MOVE_BASEPOINT) { // DragDrop of a connection doesn't create a undo command at this point. This will be done in // the onDrop method return new graphiti.command.CommandReconnect(this); } return this._super(request); }, /** * @method * Return an objects with all important attributes for XML or JSON serialization * * @returns {Object} */ <API key> : function() { var memento = this._super(); delete memento.x; delete memento.y; delete memento.width; delete memento.height; memento.source = { node:this.getSource().getParent().getId(), port: this.getSource().getName() }; memento.target = { node:this.getTarget().getParent().getId(), port:this.getTarget().getName() }; return memento; }, /** * @method * Read all attributes from the serialized properties and transfer them into the shape. * * @param {Object} memento * @returns */ <API key> : function(memento) { this._super(memento); // no extra param to read. // Reason: done by the Layoute/Router }, onClick: function() { // wait to be implemented /*$("#right-container").css({right: '0px'}); var hasClassIn = $("#collapseTwo").hasClass('in'); if(!hasClassIn) { $("#collapseOne").toggleClass('in'); $("#collapseOne").css({height: '0'}); $("#collapseTwo").toggleClass('in'); $("#collapseTwo").css({height: "auto"}); } $("#<API key>").css({"display": "none"}); $("#protein-config").css({"display": "none"}); $("#component-config").css({"display": "none"}); $("#arrow-config").css({"display": "block"});*/ /*if (this.TYPE == "Activator") { this.TYPE = "Inhibit"; this.setColor(new graphiti.util.Color("#43B967")); } else { this.TYPE = "Activator"; this.setColor(new graphiti.util.Color("#E14545")); }*/ }, /*onDoubleClick: function() { this.getCanvas().removeFigure(this); }*/ });
#ifndef LOGIC_H_ #define LOGIC_H_ #include "../VaRGBConfig.h" #include "../Curve.h" #include "Dummy.h" namespace vargb { namespace Curve { #define <API key> 2 class Logic : public vargb::Curve::Curve { public: /* * Logic Curve constructor * Takes one, or two, pointers to other curves on which to operate. */ Logic(vargb::Curve::Curve * curve_a, vargb::Curve::Curve * curve_b=NULL); #ifdef <API key> virtual ~Logic() {} #endif virtual bool completed(); virtual void settingsUpdated(); virtual void start(<API key>* initial_settings = NULL); virtual void setTick(VaRGBTimeValue setTo, <API key>* initial_settings = NULL); virtual void tick(uint8_t num = 1); virtual void reset(); protected: /* * childUpdated() * This base class will check the children to see if they've been updated * after every tick. If this happens to be the case, the childUpdated() * method will be called so the Logic curve instance can do its thing. * * This is an abstract method, which you must override in any derived classes. */ virtual void childUpdated() = 0; vargb::Curve::Curve * curves[<API key>]; private: static Dummy dummy_curve; }; } /* namespace Curve */ } /* namespace vargb */ #endif /* LOGIC_H_ */
package idare.imagenode.internal.GUI.DataSetController; import idare.imagenode.ColorManagement.ColorScalePane; import idare.imagenode.Interfaces.DataSets.DataSet; import idare.imagenode.Interfaces.Layout.<API key>; import idare.imagenode.internal.GUI.DataSetController.<API key>.ColorPaneBox; import idare.imagenode.internal.GUI.DataSetController.<API key>.ComboBoxRenderer; import javax.swing.JTable; import javax.swing.table.TableCellEditor; import javax.swing.table.TableCellRenderer; /** * A <API key>, that is specific to the {@link <API key>}, using its unique renderers and editors. * @author Thomas Pfau * */ public class <API key> extends JTable { <API key> tablemodel; public <API key>(<API key> mod) { super(mod); tablemodel = mod; } /** * Move the selected entry (we assume single selection) down one row. * If the selected row is already the top row, nothing happens. */ public void moveEntryUp() { int row = getSelectedRow(); if(row > 0) { tablemodel.moveRowUp(row); } getSelectionModel().<API key>(row-1, row-1); } /** * Move the selected entry (we assume single selection) down one row. * If the selected row is already the last row, nothing happens. */ public void moveEntryDown() { int row = getSelectedRow(); if(row >= 0 & row < getRowCount()-1 ) { tablemodel.moveRowDown(row); } getSelectionModel().<API key>(row+1, row+1); } @Override public TableCellEditor getCellEditor(int row, int column) { Object value = super.getValueAt(row, column); if(value != null) { // we need very specific Editors for ColorScales and Dataset Properties. if(value instanceof <API key>) { return tablemodel.getPropertiesEditor(row); } if(value instanceof ColorScalePane) { return tablemodel.getColorScaleEditor(row); } if(value instanceof DataSet) { return tablemodel.getDataSetEditor(row); } return getDefaultEditor(value.getClass()); } return super.getCellEditor(row, column); } @Override public TableCellRenderer getCellRenderer(int row, int column) { Object value = super.getValueAt(row, column); if(value != null) { // we need very specific renderers for ColorScales and Dataset Properties. if(value instanceof ComboBoxRenderer || value instanceof <API key>) { TableCellRenderer current = tablemodel.<API key>(row); if(current != null) return current; else return super.getCellRenderer(row, column); } if(value instanceof ColorPaneBox|| value instanceof ColorScalePane) { TableCellRenderer current = tablemodel.<API key>(row); if(current != null) return current; else return super.getCellRenderer(row, column); } return getDefaultRenderer(value.getClass()); } return super.getCellRenderer(row, column); } }
// mksysnum_linux.pl /usr/include/asm/unistd_64.h // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT // +build amd64,linux package unix const ( SYS_READ = 0 SYS_WRITE = 1 SYS_OPEN = 2 SYS_CLOSE = 3 SYS_STAT = 4 SYS_FSTAT = 5 SYS_LSTAT = 6 SYS_POLL = 7 SYS_LSEEK = 8 SYS_MMAP = 9 SYS_MPROTECT = 10 SYS_MUNMAP = 11 SYS_BRK = 12 SYS_RT_SIGACTION = 13 SYS_RT_SIGPROCMASK = 14 SYS_RT_SIGRETURN = 15 SYS_IOCTL = 16 SYS_PREAD64 = 17 SYS_PWRITE64 = 18 SYS_READV = 19 SYS_WRITEV = 20 SYS_ACCESS = 21 SYS_PIPE = 22 SYS_SELECT = 23 SYS_SCHED_YIELD = 24 SYS_MREMAP = 25 SYS_MSYNC = 26 SYS_MINCORE = 27 SYS_MADVISE = 28 SYS_SHMGET = 29 SYS_SHMAT = 30 SYS_SHMCTL = 31 SYS_DUP = 32 SYS_DUP2 = 33 SYS_PAUSE = 34 SYS_NANOSLEEP = 35 SYS_GETITIMER = 36 SYS_ALARM = 37 SYS_SETITIMER = 38 SYS_GETPID = 39 SYS_SENDFILE = 40 SYS_SOCKET = 41 SYS_CONNECT = 42 SYS_ACCEPT = 43 SYS_SENDTO = 44 SYS_RECVFROM = 45 SYS_SENDMSG = 46 SYS_RECVMSG = 47 SYS_SHUTDOWN = 48 SYS_BIND = 49 SYS_LISTEN = 50 SYS_GETSOCKNAME = 51 SYS_GETPEERNAME = 52 SYS_SOCKETPAIR = 53 SYS_SETSOCKOPT = 54 SYS_GETSOCKOPT = 55 SYS_CLONE = 56 SYS_FORK = 57 SYS_VFORK = 58 SYS_EXECVE = 59 SYS_EXIT = 60 SYS_WAIT4 = 61 SYS_KILL = 62 SYS_UNAME = 63 SYS_SEMGET = 64 SYS_SEMOP = 65 SYS_SEMCTL = 66 SYS_SHMDT = 67 SYS_MSGGET = 68 SYS_MSGSND = 69 SYS_MSGRCV = 70 SYS_MSGCTL = 71 SYS_FCNTL = 72 SYS_FLOCK = 73 SYS_FSYNC = 74 SYS_FDATASYNC = 75 SYS_TRUNCATE = 76 SYS_FTRUNCATE = 77 SYS_GETDENTS = 78 SYS_GETCWD = 79 SYS_CHDIR = 80 SYS_FCHDIR = 81 SYS_RENAME = 82 SYS_MKDIR = 83 SYS_RMDIR = 84 SYS_CREAT = 85 SYS_LINK = 86 SYS_UNLINK = 87 SYS_SYMLINK = 88 SYS_READLINK = 89 SYS_CHMOD = 90 SYS_FCHMOD = 91 SYS_CHOWN = 92 SYS_FCHOWN = 93 SYS_LCHOWN = 94 SYS_UMASK = 95 SYS_GETTIMEOFDAY = 96 SYS_GETRLIMIT = 97 SYS_GETRUSAGE = 98 SYS_SYSINFO = 99 SYS_TIMES = 100 SYS_PTRACE = 101 SYS_GETUID = 102 SYS_SYSLOG = 103 SYS_GETGID = 104 SYS_SETUID = 105 SYS_SETGID = 106 SYS_GETEUID = 107 SYS_GETEGID = 108 SYS_SETPGID = 109 SYS_GETPPID = 110 SYS_GETPGRP = 111 SYS_SETSID = 112 SYS_SETREUID = 113 SYS_SETREGID = 114 SYS_GETGROUPS = 115 SYS_SETGROUPS = 116 SYS_SETRESUID = 117 SYS_GETRESUID = 118 SYS_SETRESGID = 119 SYS_GETRESGID = 120 SYS_GETPGID = 121 SYS_SETFSUID = 122 SYS_SETFSGID = 123 SYS_GETSID = 124 SYS_CAPGET = 125 SYS_CAPSET = 126 SYS_RT_SIGPENDING = 127 SYS_RT_SIGTIMEDWAIT = 128 SYS_RT_SIGQUEUEINFO = 129 SYS_RT_SIGSUSPEND = 130 SYS_SIGALTSTACK = 131 SYS_UTIME = 132 SYS_MKNOD = 133 SYS_USELIB = 134 SYS_PERSONALITY = 135 SYS_USTAT = 136 SYS_STATFS = 137 SYS_FSTATFS = 138 SYS_SYSFS = 139 SYS_GETPRIORITY = 140 SYS_SETPRIORITY = 141 SYS_SCHED_SETPARAM = 142 SYS_SCHED_GETPARAM = 143 <API key> = 144 <API key> = 145 <API key> = 146 <API key> = 147 <API key> = 148 SYS_MLOCK = 149 SYS_MUNLOCK = 150 SYS_MLOCKALL = 151 SYS_MUNLOCKALL = 152 SYS_VHANGUP = 153 SYS_MODIFY_LDT = 154 SYS_PIVOT_ROOT = 155 SYS__SYSCTL = 156 SYS_PRCTL = 157 SYS_ARCH_PRCTL = 158 SYS_ADJTIMEX = 159 SYS_SETRLIMIT = 160 SYS_CHROOT = 161 SYS_SYNC = 162 SYS_ACCT = 163 SYS_SETTIMEOFDAY = 164 SYS_MOUNT = 165 SYS_UMOUNT2 = 166 SYS_SWAPON = 167 SYS_SWAPOFF = 168 SYS_REBOOT = 169 SYS_SENTRUSTOSTNAME = 170 SYS_SETDOMAINNAME = 171 SYS_IOPL = 172 SYS_IOPERM = 173 SYS_CREATE_MODULE = 174 SYS_INIT_MODULE = 175 SYS_DELETE_MODULE = 176 SYS_GET_KERNEL_SYMS = 177 SYS_QUERY_MODULE = 178 SYS_QUOTACTL = 179 SYS_NFSSERVCTL = 180 SYS_GETPMSG = 181 SYS_PUTPMSG = 182 SYS_AFS_SYSCALL = 183 SYS_TUXCALL = 184 SYS_SECURITY = 185 SYS_GETTID = 186 SYS_READAHEAD = 187 SYS_SETXATTR = 188 SYS_LSETXATTR = 189 SYS_FSETXATTR = 190 SYS_GETXATTR = 191 SYS_LGETXATTR = 192 SYS_FGETXATTR = 193 SYS_LISTXATTR = 194 SYS_LLISTXATTR = 195 SYS_FLISTXATTR = 196 SYS_REMOVEXATTR = 197 SYS_LREMOVEXATTR = 198 SYS_FREMOVEXATTR = 199 SYS_TKILL = 200 SYS_TIME = 201 SYS_FUTEX = 202 <API key> = 203 <API key> = 204 SYS_SET_THREAD_AREA = 205 SYS_IO_SETUP = 206 SYS_IO_DESTROY = 207 SYS_IO_GETEVENTS = 208 SYS_IO_SUBMIT = 209 SYS_IO_CANCEL = 210 SYS_GET_THREAD_AREA = 211 SYS_LOOKUP_DCOOKIE = 212 SYS_EPOLL_CREATE = 213 SYS_EPOLL_CTL_OLD = 214 SYS_EPOLL_WAIT_OLD = 215 <API key> = 216 SYS_GETDENTS64 = 217 SYS_SET_TID_ADDRESS = 218 SYS_RESTART_SYSCALL = 219 SYS_SEMTIMEDOP = 220 SYS_FADVISE64 = 221 SYS_TIMER_CREATE = 222 SYS_TIMER_SETTIME = 223 SYS_TIMER_GETTIME = 224 <API key> = 225 SYS_TIMER_DELETE = 226 SYS_CLOCK_SETTIME = 227 SYS_CLOCK_GETTIME = 228 SYS_CLOCK_GETRES = 229 SYS_CLOCK_NANOSLEEP = 230 SYS_EXIT_GROUP = 231 SYS_EPOLL_WAIT = 232 SYS_EPOLL_CTL = 233 SYS_TGKILL = 234 SYS_UTIMES = 235 SYS_VSERVER = 236 SYS_MBIND = 237 SYS_SET_MEMPOLICY = 238 SYS_GET_MEMPOLICY = 239 SYS_MQ_OPEN = 240 SYS_MQ_UNLINK = 241 SYS_MQ_TIMEDSEND = 242 SYS_MQ_TIMEDRECEIVE = 243 SYS_MQ_NOTIFY = 244 SYS_MQ_GETSETATTR = 245 SYS_KEXEC_LOAD = 246 SYS_WAITID = 247 SYS_ADD_KEY = 248 SYS_REQUEST_KEY = 249 SYS_KEYCTL = 250 SYS_IOPRIO_SET = 251 SYS_IOPRIO_GET = 252 SYS_INOTIFY_INIT = 253 <API key> = 254 <API key> = 255 SYS_MIGRATE_PAGES = 256 SYS_OPENAT = 257 SYS_MKDIRAT = 258 SYS_MKNODAT = 259 SYS_FCHOWNAT = 260 SYS_FUTIMESAT = 261 SYS_NEWFSTATAT = 262 SYS_UNLINKAT = 263 SYS_RENAMEAT = 264 SYS_LINKAT = 265 SYS_SYMLINKAT = 266 SYS_READLINKAT = 267 SYS_FCHMODAT = 268 SYS_FACCESSAT = 269 SYS_PSELECT6 = 270 SYS_PPOLL = 271 SYS_UNSHARE = 272 SYS_SET_ROBUST_LIST = 273 SYS_GET_ROBUST_LIST = 274 SYS_SPLICE = 275 SYS_TEE = 276 SYS_SYNC_FILE_RANGE = 277 SYS_VMSPLICE = 278 SYS_MOVE_PAGES = 279 SYS_UTIMENSAT = 280 SYS_EPOLL_PWAIT = 281 SYS_SIGNALFD = 282 SYS_TIMERFD_CREATE = 283 SYS_EVENTFD = 284 SYS_FALLOCATE = 285 SYS_TIMERFD_SETTIME = 286 SYS_TIMERFD_GETTIME = 287 SYS_ACCEPT4 = 288 SYS_SIGNALFD4 = 289 SYS_EVENTFD2 = 290 SYS_EPOLL_CREATE1 = 291 SYS_DUP3 = 292 SYS_PIPE2 = 293 SYS_INOTIFY_INIT1 = 294 SYS_PREADV = 295 SYS_PWRITEV = 296 <API key> = 297 SYS_PERF_EVENT_OPEN = 298 SYS_RECVMMSG = 299 SYS_FANOTIFY_INIT = 300 SYS_FANOTIFY_MARK = 301 SYS_PRLIMIT64 = 302 <API key> = 303 <API key> = 304 SYS_CLOCK_ADJTIME = 305 SYS_SYNCFS = 306 SYS_SENDMMSG = 307 SYS_SETNS = 308 SYS_GETCPU = 309 <API key> = 310 <API key> = 311 )
package mesquite.lib; import java.util.*; import java.io.*; import org.dom4j.*; import org.dom4j.io.*; public class XMLUtil { public static Element addFilledElement(Element containingElement, String name, String content) { if (content == null || name == null) return null; Element element = DocumentHelper.createElement(name); element.addText(content); containingElement.add(element); return element; } public static Element addFilledElement(Element containingElement, String name, CDATA cdata) { if (cdata == null || name == null) return null; Element element = DocumentHelper.createElement(name); element.add(cdata); containingElement.add(element); return element; } public static String getTextFromElement(Element containingElement, String name){ Element e = containingElement.element(name); if (e == null) return null; else return e.getText(); } public static String <API key>(Document doc, boolean escapeText) { try { String encoding = doc.getXMLEncoding(); if (encoding == null) encoding = "UTF-8"; Writer osw = new StringWriter(); OutputFormat opf = new OutputFormat(" ", true, encoding); XMLWriter writer = new XMLWriter(osw, opf); writer.setEscapeText(escapeText); writer.write(doc); writer.close(); return osw.toString(); } catch (IOException e) { MesquiteMessage.warnProgrammer("XML Document could not be returned as string."); } return null; } public static String <API key>(Element doc, String encoding, boolean escapeText) { try { Writer osw = new StringWriter(); OutputFormat opf = new OutputFormat(" ", true, encoding); XMLWriter writer = new XMLWriter(osw, opf); writer.setEscapeText(escapeText); writer.write(doc); writer.close(); return osw.toString(); } catch (IOException e) { MesquiteMessage.warnProgrammer("XML Document could not be returned as string."); } return null; } public static String <API key>(Document doc) { return <API key>(doc,true); } public static String <API key>(Document doc) { try { String encoding = doc.getXMLEncoding(); //if (encoding == null) // encoding = "UTF-8"; Writer osw = new StringWriter(); OutputFormat opf = new OutputFormat(" ", true); XMLWriter writer = new XMLWriter(osw, opf); writer.write(doc); writer.close(); return osw.toString(); } catch (IOException e) { MesquiteMessage.warnProgrammer("XML Document could not be returned as string."); } return null; } public static Document <API key>(String rootElementName, String contents) { Document doc = null; try { doc = DocumentHelper.parseText(contents); } catch (Exception e) { return null; } if (doc == null || doc.getRootElement() == null) { return null; } else if (!StringUtil.blank(rootElementName) && !doc.getRootElement().getName().equals(rootElementName)) { return null; } return doc; } public static Document <API key>(String contents) { return <API key>("",contents); } public static Element <API key>(String rootElementName, String contents) { Document doc = <API key>(rootElementName, contents); if (doc==null) return null; return doc.getRootElement(); } public static Element <API key>(String contents) { return <API key>("",contents); } public static Element <API key>(String rootElementName, String url) { SAXReader saxReader = new SAXReader(); Document doc = null; try { doc = saxReader.read(url); } catch (Exception e) { return null; } if (doc == null || doc.getRootElement() == null) { return null; } else if (!StringUtil.blank(rootElementName) && !doc.getRootElement().getName().equals(rootElementName)) { return null; } Element root = doc.getRootElement(); return root; } public static Element <API key>(String url) { return <API key>("",url); } public static void readXMLPreferences(MesquiteModule module, <API key> xmlPrefProcessor, String contents) { Element root = <API key>("mesquite",contents); if (root==null) return; Element element = root.element(module.getXMLModuleName()); if (element != null) { Element versionElement = element.element("version"); if (versionElement == null) return ; else { int version = MesquiteInteger.fromString(element.elementText("version")); boolean acceptableVersion = (module.getXMLPrefsVersion()==version || !module.<API key>()); if (acceptableVersion) <API key>(xmlPrefProcessor, element); else return; } } } public static void <API key> ( <API key> xmlPrefProcessor, Element element) { List prefElement = element.elements(); for (Iterator iter = prefElement.iterator(); iter.hasNext();) { // this is going through all of the notices Element messageElement = (Element) iter.next(); xmlPrefProcessor.<API key>(messageElement.getName(), messageElement.getText()); } } }
package xades4j.xml.marshalling; import java.util.EnumMap; import java.util.List; import xades4j.properties.IdentifierType; import xades4j.properties.ObjectIdentifier; import xades4j.properties.data.BaseCertRefsData; import xades4j.properties.data.CertRef; import xades4j.xml.bind.xades.XmlCertIDListType; import xades4j.xml.bind.xades.XmlCertIDType; import xades4j.xml.bind.xades.<API key>; import xades4j.xml.bind.xades.XmlIdentifierType; import xades4j.xml.bind.xades.<API key>; import xades4j.xml.bind.xades.XmlQualifierType; import xades4j.xml.bind.xmldsig.XmlDigestMethodType; import xades4j.xml.bind.xmldsig.<API key>; class ToXmlUtils { ToXmlUtils() { } private static final EnumMap<IdentifierType, XmlQualifierType> identifierTypeConv; static { identifierTypeConv = new EnumMap(IdentifierType.class); identifierTypeConv.put(IdentifierType.OIDAsURI, XmlQualifierType.OID_AS_URI); identifierTypeConv.put(IdentifierType.OIDAsURN, XmlQualifierType.OID_AS_URN); } static <API key> getXmlObjectId(ObjectIdentifier objId) { <API key> xmlObjId = new <API key>(); // Object identifier XmlIdentifierType xmlId = new XmlIdentifierType(); xmlId.setValue(objId.getIdentifier()); // If it is IdentifierType.URI the converter returns null, which is the // same as not specifying a qualifier. xmlId.setQualifier(identifierTypeConv.get(objId.getIdentifierType())); xmlObjId.setIdentifier(xmlId); return xmlObjId; } static XmlCertIDListType getXmlCertRefList(BaseCertRefsData certRefsData) { XmlCertIDListType xmlCertRefListProp = new XmlCertIDListType(); List<XmlCertIDType> xmlCertRefList = xmlCertRefListProp.getCert(); <API key> certDigest; XmlDigestMethodType certDigestMethod; <API key> issuerSerial; XmlCertIDType certID; for (CertRef certRef : certRefsData.getCertRefs()) { certDigestMethod = new XmlDigestMethodType(); certDigestMethod.setAlgorithm(certRef.digestAlgUri); certDigest = new <API key>(); certDigest.setDigestMethod(certDigestMethod); certDigest.setDigestValue(certRef.digestValue); issuerSerial = new <API key>(); issuerSerial.setX509IssuerName(certRef.issuerDN); issuerSerial.setX509SerialNumber(certRef.serialNumber); certID = new XmlCertIDType(); certID.setCertDigest(certDigest); certID.setIssuerSerial(issuerSerial); xmlCertRefList.add(certID); } return xmlCertRefListProp; } }
package co.rsk.core; import com.google.common.primitives.UnsignedBytes; import org.ethereum.rpc.TypeConverter; import org.ethereum.util.ByteUtil; import org.ethereum.vm.DataWord; import java.util.Arrays; import java.util.Comparator; /** * Immutable representation of an RSK address. * It is a simple wrapper on the raw byte[]. * * @author Ariel Mendelzon */ public class RskAddress { /** * This is the size of an RSK address in bytes. */ public static final int LENGTH_IN_BYTES = 20; private static final RskAddress NULL_ADDRESS = new RskAddress(); /** * This compares using the lexicographical order of the sender unsigned bytes. */ public static final Comparator<RskAddress> <API key> = Comparator.comparing( RskAddress::getBytes, UnsignedBytes.<API key>()); private final byte[] bytes; /** * @param address a data word containing an address in the last 20 bytes. */ public RskAddress(DataWord address) { this(address.getLast20Bytes()); } /** * @param address the hex-encoded 20 bytes long address, with or without 0x prefix. */ public RskAddress(String address) { this(TypeConverter.<API key>(address)); } /** * @param bytes the 20 bytes long raw address bytes. */ public RskAddress(byte[] bytes) { if (bytes.length != LENGTH_IN_BYTES) { throw new RuntimeException(String.format("An RSK address must be %d bytes long", LENGTH_IN_BYTES)); } this.bytes = bytes; } /** * This instantiates the contract creation address. */ private RskAddress() { this.bytes = new byte[0]; } /** * @return the null address, which is the receiver of contract creation transactions. */ public static RskAddress nullAddress() { return NULL_ADDRESS; } public byte[] getBytes() { return bytes; } public String toHexString() { return ByteUtil.toHexString(bytes); } @Override public boolean equals(Object other) { if (this == other) { return true; } if (other == null || this.getClass() != other.getClass()) { return false; } RskAddress otherSender = (RskAddress) other; return Arrays.equals(bytes, otherSender.bytes); } @Override public int hashCode() { return Arrays.hashCode(bytes); } /** * @return a DEBUG representation of the address, mainly used for logging. */ @Override public String toString() { return toHexString(); } public String toJsonString() { if (NULL_ADDRESS.equals(this)) { return null; } return TypeConverter.<API key>(this.getBytes()); } }
#include "<API key>.h" #include "<API key>.h" #include <QDebug> #include <QNetworkReply> #include <QXmlStreamReader> namespace QtAws { namespace ECRPublic { /*! * Constructs a <API key> object for \a reply to \a request, with parent \a parent. */ <API key>::<API key>( const <API key> &request, QNetworkReply * const reply, QObject * const parent) : ECRPublicResponse(new <API key>(this), parent) { setRequest(new <API key>(request)); setReply(reply); } /*! * \reimp */ const <API key> * <API key>::request() const { Q_D(const <API key>); return static_cast<const <API key> *>(d->request); } /*! * \reimp * Parses a successful ECRPublic DeleteRepository \a response. */ void <API key>::parseSuccess(QIODevice &response) { //Q_D(<API key>); QXmlStreamReader xml(&response); @todo } /*! * \class QtAws::ECRPublic::<API key> * \brief The <API key> class provides private implementation for <API key>. * \internal * * \inmodule QtAwsECRPublic */ /*! * Constructs a <API key> object with public implementation \a q. */ <API key>::<API key>( <API key> * const q) : <API key>(q) { } /*! * Parses a ECRPublic DeleteRepository response element from \a xml. */ void <API key>::<API key>(QXmlStreamReader &xml) { Q_ASSERT(xml.name() == QLatin1String("<API key>")); Q_UNUSED(xml) ///< @todo } } // namespace ECRPublic } // namespace QtAws
#pragma once #include <type_traits> #include <limits> #include <utility> namespace sio { template<typename T> struct is_bit_enum: public std::false_type {}; template<typename Enum, std::enable_if_t<std::is_enum<Enum>{}, int> = 0> class bitfield { public: using integer = std::underlying_type_t<Enum>; private: integer bits; public: constexpr bitfield() noexcept: bits(0) {} constexpr bitfield(Enum bit) noexcept: bits(static_cast<integer>(bit)) {} explicit constexpr bitfield(integer value) noexcept: bits(value) {} bitfield &operator|=(bitfield rhs) noexcept { bits |= rhs.bits; return *this; } bitfield &operator&=(bitfield rhs) noexcept { bits &= rhs.bits; return *this; } bitfield &operator^=(bitfield rhs) noexcept { bits ^= rhs.bits; return *this; } constexpr bitfield operator|(bitfield rhs) const noexcept { return bitfield { bits | rhs.bits }; } constexpr bitfield operator&(bitfield rhs) const noexcept { return bitfield { bits & rhs.bits }; } constexpr bitfield operator^(bitfield rhs) const noexcept { return bitfield { bits ^ rhs.bits }; } constexpr bitfield operator~() const noexcept { return bitfield { ~bits }; } constexpr operator bool() const noexcept { return !!bits; } constexpr bool operator==(bitfield rhs) const noexcept { return bits == rhs.bits; } constexpr bool operator!=(bitfield rhs) const noexcept { return bits != rhs.bits; } }; template<typename Writer, typename Enum> void write(Writer &&w, bitfield<Enum> field) { bool first = true; for (int i = std::numeric_limits<typename bitfield<Enum>::integer>::digits-1; i >= 0; --i) { Enum bit = static_cast<Enum>(1 << i); if (field & bit) { if (!first) { write(std::forward<Writer>(w), " | "); } else { first = false; } write(std::forward<Writer>(w), bit); } } } } // namespace sio template<typename Enum, std::enable_if_t<sio::is_bit_enum<Enum>{}, int> = 0> sio::bitfield<Enum> operator|(Enum lhs, sio::bitfield<decltype(lhs)> rhs) { return rhs | lhs; } template<typename Enum, std::enable_if_t<sio::is_bit_enum<Enum>{}, int> = 0> sio::bitfield<Enum> operator&(Enum lhs, sio::bitfield<decltype(lhs)> rhs) { return rhs & lhs; } template<typename Enum, std::enable_if_t<sio::is_bit_enum<Enum>{}, int> = 0> sio::bitfield<Enum> operator^(Enum lhs, sio::bitfield<decltype(lhs)> rhs) { return rhs ^ lhs; } template<typename Enum, std::enable_if_t<sio::is_bit_enum<Enum>{}, int> = 0> sio::bitfield<Enum> operator~(Enum lhs) { return ~sio::bitfield<Enum>(lhs); }
package com.hyenawarrior.oldnorsedictionary.modelview.meaning_panel import android.app.Activity import android.view.{View, ViewGroup} import android.widget.{EditText, TextView} import com.hyenawarrior.oldnorsedictionary.R import com.hyenawarrior.oldnorsedictionary.modelview.{ClickListener, DynamicListView, <API key>} import com.hyenawarrior.oldnorsedictionary.new_word.pages.MeaningDef class MeaningDefListView(activity: Activity, hostView: ViewGroup) extends DynamicListView[MeaningDef](hostView, R.layout.meaning_record, activity) { private var meanings: Map[View, (String, String, ExampleRecordView)] = Map() override protected def applyToView(optElem: Option[MeaningDef], meaningRecordView: View): Unit = { val elem = optElem getOrElse MeaningDef("", "", Seq()) val btnRemove = meaningRecordView.findViewById[View](R.id.ibRemove) btnRemove setOnClickListener ClickListener(onRemoveMeaningDef(meaningRecordView)) val etMeaning = meaningRecordView.findViewById[EditText](R.id.et_setmeaning_Desc) etMeaning.setText(elem.meaning, TextView.BufferType.EDITABLE) etMeaning <API key> new <API key>(onMeaningChange(meaningRecordView)) val etNote = meaningRecordView.findViewById[EditText](R.id.et_setmeaning_Note) etNote.setText(elem.note, TextView.BufferType.EDITABLE) etNote <API key> new <API key>(onNoteChange(meaningRecordView)) val subControlOfHost = meaningRecordView.findViewById[ViewGroup](R.id.<API key>) val exRecHandler = new ExampleRecordView(activity, subControlOfHost) for(exStr <- elem.examples) { exRecHandler add exStr } meanings = meanings + ((meaningRecordView, (elem.meaning, elem.note, exRecHandler))) } private def onRemoveMeaningDef(meaningRecordView: View)(): Unit = { meanings = meanings - meaningRecordView remove(meaningRecordView) } private def onMeaningChange(meaningRecordView: View)(text: String): Unit = { val item = meanings(meaningRecordView) val newEntry = (meaningRecordView, (text, item._2, item._3)) meanings = (meanings - meaningRecordView) + newEntry } private def onNoteChange(meaningRecordView: View)(text: String): Unit = { val item = meanings(meaningRecordView) val newEntry = (meaningRecordView, (item._1, text, item._3)) meanings = (meanings - meaningRecordView) + newEntry } def fetch(): List[MeaningDef] = meanings.values.map { case (meaning, note, exs) => MeaningDef(meaning, note, exs.fetch()) } .toList }
#include <bits/stdc++.h> using namespace std; #define DEBUG // comment this line to pull out print statements #ifdef DEBUG const char NEWLINE[] = "\n"; const char TAB[] = "\t"; #define EMPTY() #define DEFER(...) __VA_ARGS__ EMPTY() #define DEFER2(...) __VA_ARGS__ DEFER(EMPTY) () #define DEFER3(...) __VA_ARGS__ DEFER2(EMPTY) () #define EVAL_1(...) __VA_ARGS__ #define EVAL_2(...) EVAL_1(EVAL_1(__VA_ARGS__)) #define EVAL_3(...) EVAL_2(EVAL_2(__VA_ARGS__)) #define EVAL_4(...) EVAL_3(EVAL_3(__VA_ARGS__)) #define EVAL_5(...) EVAL_4(EVAL_4(__VA_ARGS__)) #define EVAL_6(...) EVAL_5(EVAL_5(__VA_ARGS__)) #define EVAL_7(...) EVAL_6(EVAL_6(__VA_ARGS__)) #define EVAL_8(...) EVAL_7(EVAL_7(__VA_ARGS__)) #define EVAL(...) EVAL_8(__VA_ARGS__) #define NOT_0 EXISTS(1) #define NOT(x) TRY_EXTRACT_EXISTS ( CAT(NOT_, x), 0 ) #define IS_ENCLOSED(x, ...) TRY_EXTRACT_EXISTS ( IS_ENCLOSED_TEST x, 0 ) #define ENCLOSE_EXPAND(...) EXPANDED, ENCLOSED, (__VA_ARGS__) ) EAT ( #define GET_CAT_EXP(a, b) (a, ENCLOSE_EXPAND b, DEFAULT, b ) #define CAT_WITH_ENCLOSED(a, b) a b #define CAT_WITH_DEFAULT(a, b) a #define CAT_WITH(a, _, f, b) CAT_WITH_ ## f (a, b) #define EVAL_CAT_WITH(...) CAT_WITH __VA_ARGS__ #define CAT(a, b) EVAL_CAT_WITH ( GET_CAT_EXP(a, b) ) #define IF_1(true, ...) true #define IF_0(true, ...) __VA_ARGS__ #define IF(value) CAT(IF_, value) #define HEAD(x, ...) x #define TAIL(x, ...) __VA_ARGS__ #define TEST_LAST EXISTS(1) #define IS_LIST_EMPTY(...) TRY_EXTRACT_EXISTS( DEFER(HEAD) (__VA_ARGS__ EXISTS(1)) , 0) #define IS_LIST_NOT_EMPTY(...) NOT(IS_LIST_EMPTY(__VA_ARGS__)) #define <API key>(...) 1 #define <API key> 0 #define DOES_VALUE_EXIST(x) CAT(DOES_VALUE_EXIST_, x) #define TRY_EXTRACT_EXISTS(value, ...) IF ( DOES_VALUE_EXIST(TEST_EXISTS(value)) ) \ ( EXTRACT_VALUE(value), __VA_ARGS__ ) #define <API key>(...) __VA_ARGS__ #define EXTRACT_VALUE(value) CAT(EXTRACT_VALUE_, value) #define EAT(...) #define EXPAND_TEST_EXISTS(...) EXPANDED, EXISTS(__VA_ARGS__) ) EAT ( #define <API key>(x) ( CAT(EXPAND_TEST_, x), DOESNT_EXIST ) #define <API key>(expansion, existValue) existValue #define <API key>(x) <API key> x #define TEST_EXISTS(x) <API key> ( <API key>(x) ) #define ENCLOSE(...) ( __VA_ARGS__ ) #define REM_ENCLOSE_(...) __VA_ARGS__ #define REM_ENCLOSE(...) REM_ENCLOSE_ __VA_ARGS__ #define IF_ENCLOSED_1(true, ...) true #define IF_ENCLOSED_0(true, ...) __VA_ARGS__ #define IF_ENCLOSED(...) CAT(IF_ENCLOSED_, IS_ENCLOSED(__VA_ARGS__)) #define OPT_REM_ENCLOSE(...) \ IF_ENCLOSED (__VA_ARGS__) ( REM_ENCLOSE(__VA_ARGS__), __VA_ARGS__ ) #define FOR_EACH_INDIRECT() FOR_EACH_NO_EVAL #define FOR_EACH_NO_EVAL(fVisitor, ...) \ IF ( IS_LIST_NOT_EMPTY( __VA_ARGS__ ) ) \ ( \ fVisitor( OPT_REM_ENCLOSE(HEAD(__VA_ARGS__)) ) \ DEFER2 ( FOR_EACH_INDIRECT )() (fVisitor, TAIL(__VA_ARGS__)) \ ) #define FOR_EACH(fVisitor, ...) \ EVAL(FOR_EACH_NO_EVAL(fVisitor, __VA_ARGS__)) #define STRINGIFY(x) #define DUMP_VAR(x) std::cout << STRINGIFY(x) << ": " << x << TAB; #define debug(...) FOR_EACH(DUMP_VAR, __VA_ARGS__); std::cout << NEWLINE; #define dbg(block) block #else #define debug(...) #define dbg(block) #endif const double EPS = 1E-9; // -- insert geometry.hh here for geometric functions typedef vector<int> vi; typedef vector<pair<int,int>> vii; #define UN(v) SORT(v),v.erase(unique(v.begin(),v.end()),v.end()) #define SORT(c) sort((c).begin(),(c).end()) #define FOR(i,a,b) for (int i=(a); i < (b); i++) #define REP(i,n) FOR(i,0,(int)n) #define CL(a,b) memset(a,b,sizeof(a)) #define CL2d(a,b,x,y) memset(a, b, sizeof(a[0][0])*x*y) /* global variables */ int W, N; int l, w; int i, j, k; char Ws[20], Ns[20]; int total_area; char line[100]; //char answers[10000][21]; char answers[100000]; int ans, ansb; int tlen, clen; /* global variables */ void dump() { // dump data } bool getInput() { if (feof(stdin)) return false; return true; } void process() { // int a = 2, b = 5, c = 3; // debug(a, b, c); // debugging example // printf("%d\n", total_area/W); } int main() { ios_base::sync_with_stdio(false); char digits[10]; fgets_unlocked(line, 99, stdin); do { for (i = 0; line[i] != '\n'; ++i) { Ws[i] = line[i]; } Ws[i] = 0; for (k = 0; k < i-1; ++k) { W += Ws[k]-'0'; W *= 10; } W += Ws[k]-'0'; fgets_unlocked(line, 99, stdin); for (j = 0; line[j] != '\n'; ++j) { Ns[j] = line[j]; } for (k = 0; k < j-1; ++k) { N += Ns[k]-'0'; N *= 10; } N += Ns[k]-'0'; REP(counter, N) { l = w = 0; fgets_unlocked(line, 99, stdin); for (i = 0; line[i] != ' '; ++i) { Ws[i] = line[i]; } Ws[i+1] = 0; for (k = 0; k < i-1; ++k) { l += Ws[k]-'0'; l *= 10; } l += Ws[k]-'0'; while (line[i] == ' ') { ++i; } for (j = 0; line[i] != '\n' && line[i] != 0; ++i, ++j) { Ns[j] = line[i]; } Ns[j+1] = 0; for (k = 0; k < j-1; ++k) { w += Ns[k]-'0'; w *= 10; } w += Ns[k]-'0'; total_area += l*w; } ans = total_area/W, ansb = ans; digits[9] = '\n'; clen = 9; while (ans != 0) { digits[--clen] = (ans%10)+'0'; ans /= 10; } memcpy(&answers[tlen], &digits[clen], 10-clen); tlen += 10-clen; /* CLEAR GLOBAL VARIABLES! */ total_area = 0; W = 0; N = 0; l = 0; w = 0; /* CLEAR GLOBAL VARIABLES! */ fgets_unlocked(line, 99, stdin); } while (!feof_unlocked(stdin)); fwrite_unlocked(&answers, sizeof(char), tlen, stdout); return 0; }
XCC = xmpcc XRUN = mpiexec TESTS = $(wildcard *.c) EXES = $(TESTS:.c=.x) OBJS = $(TESTS:.c=.o) .PHONY: clean all default run submit showlog cleanlog all default: $(EXES) .SUFFIXES: .x .c.x: $(XCC) -o $@ $< run: $(XRUN) -n 1 ./coarray_translation.x $(XRUN) -n 2 ./coarray_scalar.x $(XRUN) -n 2 ./coarray_vector.x $(XRUN) -n 2 ./coarray_stride.x $(XRUN) -n 2 ./coarray_scalar_mput.x $(XRUN) -n 2 ./coarray_scalar_mget.x $(XRUN) -n 2 ./<API key>.x $(XRUN) -n 2 ./coarray_put_1dim.x $(XRUN) -n 2 ./coarray_put_2dims.x $(XRUN) -n 2 ./coarray_put_3dims.x $(XRUN) -n 2 ./coarray_put_4dims.x $(XRUN) -n 2 ./coarray_get_1dim.x $(XRUN) -n 2 ./coarray_get_2dims.x $(XRUN) -n 2 ./coarray_get_3dims.x $(XRUN) -n 2 ./coarray_get_4dims.x $(XRUN) -n 1 ./coarray_local_put.x $(XRUN) -n 1 ./coarray_local_get.x RUN: mkdir RUN RUN/%.x:: %.x cp $< $@ RUN/go.sh: go.template Makefile cp $< $@ && grep XRUN Makefile | sed -e 's/(XRUN)/{XRUN}/' -e 's/ *= */=/' | grep -v Makefile >>$@ submit: all RUN RUN/go.sh $(EXES:%=RUN/%) cd RUN; pjsub go.sh showlog: cat RUN/go.sh.e* RUN/go.sh.o* cleanlog: rm -rf RUN clean: cleanlog rm -f $(EXES) $(OBJS)
#include "millionaire_prob.h" #include "../../../abycore/circuit/booleancircuits.h" #include "../../../abycore/sharing/sharing.h" int32_t <API key>(e_role role, const std::string& address, uint16_t port, seclvl seclvl, uint32_t bitlen, uint32_t nthreads, e_mt_gen_alg mt_alg, e_sharing sharing) { /** Step 1: Create the ABYParty object which defines the basis of all the operations which are happening. Operations performed are on the basis of the role played by this object. */ ABYParty* party = new ABYParty(role, address, port, seclvl, bitlen, nthreads, mt_alg); /** Step 2: Get to know all the sharing types available in the program. */ std::vector<Sharing*>& sharings = party->GetSharings(); /** Step 3: Create the circuit object on the basis of the sharing type being inputed. */ Circuit* circ = sharings[sharing]-><API key>(); /** Step 4: Creating the share objects - s_alice_money, s_bob_money which is used as input to the computation function. Also s_out which stores the output. */ share *s_alice_money, *s_bob_money, *s_out; /** Step 5: Initialize Alice's and Bob's money with random values. Both parties use the same seed, to be able to verify the result. In a real example each party would only supply one input value. */ uint32_t alice_money, bob_money, output; srand(time(NULL)); alice_money = rand(); bob_money = rand(); /** Step 6: Copy the randomly generated money into the respective share objects using the circuit object method PutINGate() for my inputs and PutDummyINGate() for the other parties input. Also mention who is sharing the object. */ //s_alice_money = circ->PutINGate(alice_money, bitlen, CLIENT); //s_bob_money = circ->PutINGate(bob_money, bitlen, SERVER); if(role == SERVER) { s_alice_money = circ->PutDummyINGate(bitlen); s_bob_money = circ->PutINGate(bob_money, bitlen, SERVER); } else { //role == CLIENT s_alice_money = circ->PutINGate(alice_money, bitlen, CLIENT); s_bob_money = circ->PutDummyINGate(bitlen); } /** Step 7: Call the build method for building the circuit for the problem by passing the shared objects and circuit object. Don't forget to type cast the circuit object to type of share */ s_out = <API key>(s_alice_money, s_bob_money, (BooleanCircuit*) circ); /** Step 8: Modify the output receiver based on the role played by the server and the client. This step writes the output to the shared output object based on the role. */ s_out = circ->PutOUTGate(s_out, ALL); /** Step 9: Executing the circuit using the ABYParty object evaluate the problem. */ party->ExecCircuit(); /** Step 10:Type casting the value to 32 bit unsigned integer for output. */ output = s_out->get_clear_value<uint32_t>(); std::cout << "Testing Millionaire's Problem in " << get_sharing_name(sharing) << " sharing: " << std::endl; std::cout << "\nAlice Money:\t" << alice_money; std::cout << "\nBob Money:\t" << bob_money; std::cout << "\nCircuit Result:\t" << (output ? ALICE : BOB); std::cout << "\nVerify Result: \t" << ((alice_money > bob_money) ? ALICE : BOB) << "\n"; delete party; return 0; } share* <API key>(share *s_alice, share *s_bob, BooleanCircuit *bc) { share* out; /** Calling the greater than equal function in the Boolean circuit class.*/ out = bc->PutGTGate(s_alice, s_bob); return out; }
<?php /*! \file functions.search.inc.php * * \brief PHP function collection */ function addVideoStream($mysqli, $tagDVDVIDEOSTREAM, $idDVDVMGM, $idDVDVTS) { $attributes = $tagDVDVIDEOSTREAM->attributes(); $Type = value_or_null($attributes["Type"]); $ID = value_or_null($attributes["ID"]); $VideoCodingMode = value_or_null($attributes["VideoCodingMode"]); $VideoStandard = value_or_null($attributes["VideoStandard"]); $VideoAspect = value_or_null($attributes["VideoAspect"]); $<API key> = value_or_null($attributes["<API key>"]); $<API key> = value_or_null($attributes["<API key>"]); $<API key> = value_or_null($attributes["<API key>"]); $CBR = value_or_null($attributes["CBR"]); $Resolution = value_or_null($attributes["Resolution"]); $LetterBoxed = value_or_null($attributes["LetterBoxed"]); $SourceFilm = value_or_null($attributes["SourceFilm"]); if ($idDVDVTS == null) { $Type = "VMG"; } $strSQL = "INSERT INTO DVDVIDEOSTREAM (DVDVMGMKey, DVDVTSKey, Type, ID, VideoCodingMode, VideoStandard, VideoAspect, <API key>, <API key>, <API key>, CBR, Resolution, LetterBoxed, SourceFilm) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);"; $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing insert statement for DVDVIDEOSTREAM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->bind_param("iisisssiiiisii", $idDVDVMGM, $idDVDVTS, $Type, $ID, $VideoCodingMode, $VideoStandard, $VideoAspect, $<API key>, $<API key>, $<API key>, $CBR, $Resolution, $LetterBoxed, $SourceFilm)) { $ResponseText = "Error binding parameters for DVDVIDEOSTREAM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->execute()) { $ResponseText = "Error executing statement on DVDVIDEOSTREAM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } $stmt->close(); } function updateVideoStream($mysqli, $tagDVDVIDEOSTREAM, $idDVDVMGM, $idDVDVTS) { $attributes = $tagDVDVIDEOSTREAM->attributes(); $Type = value_or_null($attributes["Type"]); $ID = value_or_null($attributes["ID"]); $VideoCodingMode = value_or_null($attributes["VideoCodingMode"]); $VideoStandard = value_or_null($attributes["VideoStandard"]); $VideoAspect = value_or_null($attributes["VideoAspect"]); $<API key> = value_or_null($attributes["<API key>"]); $<API key> = value_or_null($attributes["<API key>"]); $<API key> = value_or_null($attributes["<API key>"]); $CBR = value_or_null($attributes["CBR"]); $Resolution = value_or_null($attributes["Resolution"]); $LetterBoxed = value_or_null($attributes["LetterBoxed"]); $SourceFilm = value_or_null($attributes["SourceFilm"]); if ($idDVDVMGM == null) { $Type = "VMG"; } $strSQL = "UPDATE DVDVIDEOSTREAM SET ID = ?, VideoCodingMode = ?, VideoStandard = ?, VideoAspect = ?, <API key> = ?, <API key> = ?, <API key> = ?, CBR = ?, Resolution = ?, LetterBoxed = ?, SourceFilm = ? "; if ($idDVDVMGM != null) { $strSQL .= "WHERE DVDVMGMKey = ? AND DVDVTSKey IS NULL AND Type = ?;"; } else { $strSQL .= "WHERE DVDVMGMKey IS NULL AND DVDVTSKey = ? AND Type = ?;"; } $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing update statement for DVDVIDEOSTREAM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if ($idDVDVMGM != null) { if (!$stmt->bind_param("isssiiiisiiis", $ID, $VideoCodingMode, $VideoStandard, $VideoAspect, $<API key>, $<API key>, $<API key>, $CBR, $Resolution, $LetterBoxed, $SourceFilm, $idDVDVMGM, $Type)) { $ResponseText = "Error binding parameters for DVDVIDEOSTREAM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } } else { if (!$stmt->bind_param("isssiiiisiiis", $ID, $VideoCodingMode, $VideoStandard, $VideoAspect, $<API key>, $<API key>, $<API key>, $CBR, $Resolution, $LetterBoxed, $SourceFilm, $idDVDVTS, $Type)) { $ResponseText = "Error binding parameters for DVDVIDEOSTREAM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } } if (!$stmt->execute()) { $ResponseText = "Error executing statement on DVDVIDEOSTREAM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } $stmt->close(); } function addAudioStream($mysqli, $tagDVDAUDIOSTREAM, $idDVDVMGM, $idDVDVTS) { $attributes = $tagDVDAUDIOSTREAM->attributes(); $Number = value_or_null($attributes["Number"]); $Type = value_or_null($attributes["Type"]); $ID = value_or_null($attributes["ID"]); $Channels = value_or_null($attributes["Channels"]); $SampleRate = value_or_null($attributes["SampleRate"]); $Quantisation = value_or_null($attributes["Quantisation"]); $<API key> = value_or_null($attributes["<API key>"]); $CodingMode = value_or_null($attributes["CodingMode"]); if ($idDVDVTS == null) { $Type = "VMG"; } $strSQL = "INSERT INTO DVDAUDIOSTREAM (DVDVMGMKey, DVDVTSKey, Number, Type, ID, SampleRate, Channels, Quantisation, CodingMode) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?);"; $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing insert statement for DVDAUDIOSTREAM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->bind_param("iiisiiiss", $idDVDVMGM, $idDVDVTS, $Number, $Type, $ID, $SampleRate, $Channels, $Quantisation, $CodingMode)) { $ResponseText = "Error binding parameters for DVDAUDIOSTREAM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->execute()) { $ResponseText = "Error executing statement on DVDAUDIOSTREAM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } $stmt->close(); } function updateAudioStream($mysqli, $tagDVDAUDIOSTREAM, $idDVDVMGM, $idDVDVTS) { $attributes = $tagDVDAUDIOSTREAM->attributes(); $Number = value_or_null($attributes["Number"]); $Type = value_or_null($attributes["Type"]); $ID = value_or_null($attributes["ID"]); $Channels = value_or_null($attributes["Channels"]); $SampleRate = value_or_null($attributes["SampleRate"]); $Quantisation = value_or_null($attributes["Quantisation"]); $<API key> = value_or_null($attributes["<API key>"]); $CodingMode = value_or_null($attributes["CodingMode"]); if ($idDVDVTS == null) { $Type = "VMG"; } $strSQL = "UPDATE DVDAUDIOSTREAM SET ID = ?, SampleRate = ?, Channels = ?, Quantisation = ?, CodingMode = ? "; if ($idDVDVMGM != null) { $strSQL .= "WHERE DVDVMGMKey = ? AND DVDVTSKey IS NULL AND Number = ? AND Type = ?;"; } else { $strSQL .= "WHERE DVDVMGMKey IS NULL AND DVDVTSKey = ? AND Number = ? AND Type = ?;"; } $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing update statement for DVDAUDIOSTREAM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if ($idDVDVMGM != null) { if (!$stmt->bind_param("iiissiis", $ID, $SampleRate, $Channels, $Quantisation, $CodingMode, $idDVDVMGM, $Number, $Type)) { $ResponseText = "Error binding parameters for DVDAUDIOSTREAM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } } else { if (!$stmt->bind_param("iiissiis", $ID, $SampleRate, $Channels, $Quantisation, $CodingMode, $idDVDVTS, $Number, $Type)) { $ResponseText = "Error binding parameters for DVDAUDIOSTREAM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } } if (!$stmt->execute()) { $ResponseText = "Error executing statement on DVDAUDIOSTREAM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } $stmt->close(); } function addAudioStreamEx($mysqli, $audiostreamExTag, $idDVDVTS) { $attributes = $audiostreamExTag->attributes(); $Number = value_or_null($attributes["Number"]); $Type = value_or_null($attributes["Type"]); $<API key> = value_or_null($attributes["<API key>"]); $KaraokeVersion = value_or_null($attributes["KaraokeVersion"]); $ApplicationMode = value_or_null($attributes["ApplicationMode"]); $MCIntroPresent = value_or_null($attributes["MCIntroPresent"]); $LanguageCodePresent = value_or_null($attributes["LanguageCodePresent"]); $LanguageCode = value_or_null($attributes["LanguageCode"]); $CodeExtPresent = value_or_null($attributes["CodeExtPresent"]); $CodeExt = value_or_null($attributes["CodeExt"]); if ($idDVDVTS == null) { $Type = "VMG"; } $strSQL = "INSERT INTO DVDAUDIOSTREAMEX (DVDVTSKey, Number, <API key>, KaraokeVersion, ApplicationMode, MCIntroPresent, LanguageCodePresent, LanguageCode, CodeExtPresent, CodeExt) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?);"; $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing insert statement for DVDAUDIOSTREAMEX table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->bind_param("iiiisiisii", $idDVDVTS, $Number, $<API key>, $KaraokeVersion, $ApplicationMode, $MCIntroPresent, $LanguageCodePresent, $LanguageCode, $CodeExtPresent, $CodeExt)) { $ResponseText = "Error binding parameters for DVDAUDIOSTREAMEX table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->execute()) { $ResponseText = "Error executing statement on DVDAUDIOSTREAMEX table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } $stmt->close(); } function updateAudioStreamEx($mysqli, $audiostreamExTag, $idDVDVTS) { $attributes = $audiostreamExTag->attributes(); $Number = value_or_null($attributes["Number"]); $<API key> = value_or_null($attributes["<API key>"]); $KaraokeVersion = value_or_null($attributes["KaraokeVersion"]); $ApplicationMode = value_or_null($attributes["ApplicationMode"]); $MCIntroPresent = value_or_null($attributes["MCIntroPresent"]); $LanguageCodePresent = value_or_null($attributes["LanguageCodePresent"]); $LanguageCode = value_or_null($attributes["LanguageCode"]); $CodeExtPresent = value_or_null($attributes["CodeExtPresent"]); $CodeExt = value_or_null($attributes["CodeExt"]); $strSQL = "UPDATE DVDAUDIOSTREAMEX SET <API key> = ?, KaraokeVersion = ?, ApplicationMode = ?, MCIntroPresent = ?, LanguageCodePresent = ?, LanguageCode = ?, CodeExtPresent = ?, CodeExt = ? WHERE DVDVTSKey = ? AND Number = ?;"; $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing update statement for DVDAUDIOSTREAMEX table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->bind_param("isiisiiiii", $<API key>, $KaraokeVersion, $ApplicationMode, $MCIntroPresent, $LanguageCodePresent, $LanguageCode, $CodeExtPresent, $CodeExt, $idDVDVTS, $Number)) { $ResponseText = "Error binding parameters for DVDAUDIOSTREAMEX table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->execute()) { $ResponseText = "Error executing statement on DVDAUDIOSTREAMEX table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } $stmt->close(); } function addSubPictureStream($mysqli, $tagDVDSUBPICSTREAM, $idDVDVMGM, $idDVDVTS) { $attributes = $tagDVDSUBPICSTREAM->attributes(); $Number = value_or_null($attributes["Number"]); $ID = value_or_null($attributes["ID"]); $Type = value_or_null($attributes["Type"]); $CodingMode = value_or_null($attributes["CodingMode"]); $LanguageCodePresent = value_or_null($attributes["LanguageCodePresent"]); $LanguageCode = value_or_null($attributes["LanguageCode"]); $CodeExtPresent = value_or_null($attributes["CodeExtPresent"]); $CodeExt = value_or_null($attributes["CodeExt"]); if ($idDVDVTS == null) { $Type = "VMG"; } $strSQL = "INSERT INTO DVDSUBPICSTREAM (DVDVMGMKey, DVDVTSKey, Number, ID, Type, CodingMode, LanguageCodePresent, LanguageCode, CodeExtPresent, CodeExt) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?);"; $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing insert statement for DVDSUBPICSTREAM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->bind_param("iiissiisii", $idDVDVMGM, $idDVDVTS, $Number, $ID, $Type, $CodingMode, $LanguageCodePresent, $LanguageCode, $CodeExtPresent, $CodeExt)) { $ResponseText = "Error binding parameters for DVDSUBPICSTREAM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->execute()) { $ResponseText = "Error executing statement on DVDSUBPICSTREAM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } $stmt->close(); } function <API key>($mysqli, $tagDVDSUBPICSTREAM, $idDVDVMGM, $idDVDVTS) { $attributes = $tagDVDSUBPICSTREAM->attributes(); $Number = value_or_null($attributes["Number"]); $ID = value_or_null($attributes["ID"]); $Type = value_or_null($attributes["Type"]); $CodingMode = value_or_null($attributes["CodingMode"]); $LanguageCodePresent = value_or_null($attributes["LanguageCodePresent"]); $LanguageCode = value_or_null($attributes["LanguageCode"]); $CodeExtPresent = value_or_null($attributes["CodeExtPresent"]); $CodeExt = value_or_null($attributes["CodeExt"]); if ($idDVDVTS == null) { $Type = "VMG"; } $strSQL = "UPDATE DVDSUBPICSTREAM SET ID = ?, CodingMode = ?, LanguageCodePresent = ?, LanguageCode = ?, CodeExtPresent = ?, CodeExt = ? "; if ($idDVDVMGM != null) { $strSQL .= "WHERE DVDVMGMKey = ? AND DVDVTSKey IS NULL AND Number = ? AND Type = ?;"; } else { $strSQL .= "WHERE DVDVMGMKey IS NULL AND DVDVTSKey = ? AND Number = ? AND Type = ?;"; } $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing update statement for DVDSUBPICSTREAM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if ($idDVDVMGM != null) { if (!$stmt->bind_param("siisiiiis", $ID, $CodingMode, $LanguageCodePresent, $LanguageCode, $CodeExtPresent, $CodeExt, $idDVDVMGM, $Number, $Type)) { $ResponseText = "Error binding parameters for DVDSUBPICSTREAM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } } else { if (!$stmt->bind_param("siisiiiis", $ID, $CodingMode, $LanguageCodePresent, $LanguageCode, $CodeExtPresent, $CodeExt, $idDVDVTS, $Number, $Type)) { $ResponseText = "Error binding parameters for DVDSUBPICSTREAM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } } if (!$stmt->execute()) { $ResponseText = "Error executing statement on DVDSUBPICSTREAM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } $stmt->close(); } function addFileset($mysqli, $tagDVDFILE, $idDVDVMGM, $idDVDVTS) { $attributes = $tagDVDFILE->attributes(); $FileSetNo = value_or_null($attributes["Number"]); $Type = value_or_null($attributes["Type"]); $VobNo = value_or_null($attributes["VobNo"]); $Size = value_or_null($attributes["Size"]); $Date = value_or_null($attributes["Date"]); $strSQL = "INSERT INTO DVDFILE (DVDVMGMKey, DVDVTSKey, FileSetNo, Type, VobNo, Size, Date) VALUES (?, ?, ?, ?, ?, ?, ?);"; $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing insert statement for DVDFILE table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->bind_param("iiisiis", $idDVDVMGM, $idDVDVTS, $FileSetNo, $Type, $VobNo, $Size, $Date)) { $ResponseText = "Error binding parameters for DVDFILE table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->execute()) { $ResponseText = "Error executing statement on DVDFILE table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } $stmt->close(); } function updateFileset($mysqli, $tagDVDFILE, $idDVDVMGM, $idDVDVTS) { $attributes = $tagDVDFILE->attributes(); $FileSetNo = value_or_null($attributes["Number"]); $Type = value_or_null($attributes["Type"]); $VobNo = value_or_null($attributes["VobNo"]); $Size = value_or_null($attributes["Size"]); $Date = value_or_null($attributes["Date"]); $strSQL = "UPDATE `DVDFILE` SET `Type` = ?, `VobNo` = ?, `Size` = ?, `Date` = ? "; if ($idDVDVMGM != null) { $strSQL .= "WHERE DVDVMGMKey = ? AND DVDVTSKey IS NULL AND FileSetNo = ?;"; } else { $strSQL .= "WHERE DVDVMGMKey IS NULL AND DVDVTSKey = ? AND FileSetNo = ?;"; } $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing insert statement for DVDFILE table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if ($idDVDVMGM != null) { if (!$stmt->bind_param("siisii", $Type, $VobNo, $Size, $Date, $idDVDVMGM, $FileSetNo)) { $ResponseText = "Error binding parameters for DVDFILE table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } } else { if (!$stmt->bind_param("siisii", $Type, $VobNo, $Size, $Date, $idDVDVTS, $FileSetNo)) { $ResponseText = "Error binding parameters for DVDFILE table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } } if (!$stmt->execute()) { $ResponseText = "Error executing statement on DVDFILE table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } $stmt->close(); } function submit($mysqli, $xml, $XmlVersion) { /* query_server($mysqli, "TRUNCATE TABLE `DVDAUDIOSTREAM`;"); query_server($mysqli, "TRUNCATE TABLE `DVDAUDIOSTREAMEX`;"); query_server($mysqli, "TRUNCATE TABLE `DVDSUBPICSTREAM`;"); query_server($mysqli, "TRUNCATE TABLE `DVDVIDEOSTREAM`;"); query_server($mysqli, "TRUNCATE TABLE `DVDFILE`;"); query_server($mysqli, "TRUNCATE TABLE `DVDPTTVMG`;"); query_server($mysqli, "TRUNCATE TABLE `DVDPTTVTS`;"); query_server($mysqli, "TRUNCATE TABLE `DVDUNIT`;"); query_server($mysqli, "TRUNCATE TABLE `DVDCELL`;"); query_server($mysqli, "TRUNCATE TABLE `DVDPROGRAM`;"); query_server($mysqli, "TRUNCATE TABLE `DVDPGC`;"); query_server($mysqli, "TRUNCATE TABLE `DVDVTS`;"); query_server($mysqli, "TRUNCATE TABLE `DVDVMGM`;"); */ // Start a transaction query_server($mysqli, "START TRANSACTION;"); foreach ($xml->DVD as $tagDVDVMGM) { $attributes = $tagDVDVMGM->attributes(); $Hash = value_or_null($attributes["Hash"]); $SubmitterIP = value_or_null($_SERVER['REMOTE_ADDR']); $Album = value_or_null($tagDVDVMGM->Album); $OriginalAlbum = value_or_null($tagDVDVMGM->OriginalAlbum); $AlbumArtist = value_or_null($tagDVDVMGM->AlbumArtist); $Genre = value_or_null($tagDVDVMGM->Genre); $Cast = value_or_null($tagDVDVMGM->Cast); $Crew = value_or_null($tagDVDVMGM->Crew); $Director = value_or_null($tagDVDVMGM->Director); $Screenplay = value_or_null($tagDVDVMGM->Screenplay); $Producer = value_or_null($tagDVDVMGM->Producer); $Editing = value_or_null($tagDVDVMGM->Editing); $Cinematography = value_or_null($tagDVDVMGM->Cinematography); $Country = value_or_null($tagDVDVMGM->Country); $OriginalLanguage = value_or_null($tagDVDVMGM->OriginalLanguage); $ReleaseDate = date_or_null($tagDVDVMGM->ReleaseDate); $SpecialFeatures = value_or_null($tagDVDVMGM->SpecialFeatures); $EAN_UPC = value_or_null($tagDVDVMGM->EAN_UPC); $Storyline = value_or_null($tagDVDVMGM->Storyline); $Submitter = value_or_null($tagDVDVMGM->Submitter); $Client = value_or_null($tagDVDVMGM->Client); $Remarks = value_or_null($tagDVDVMGM->Remarks); $Keywords = value_or_null($tagDVDVMGM->Keywords); $RegionProhibited1 = value_or_null($attributes["RegionProhibited1"]); $RegionProhibited2 = value_or_null($attributes["RegionProhibited2"]); $RegionProhibited3 = value_or_null($attributes["RegionProhibited3"]); $RegionProhibited4 = value_or_null($attributes["RegionProhibited4"]); $RegionProhibited5 = value_or_null($attributes["RegionProhibited5"]); $RegionProhibited6 = value_or_null($attributes["RegionProhibited6"]); $RegionProhibited7 = value_or_null($attributes["RegionProhibited7"]); $RegionProhibited8 = value_or_null($attributes["RegionProhibited8"]); $VersionNumberMajor = value_or_null($attributes["VersionNumberMajor"]); $VersionNumberMinor = value_or_null($attributes["VersionNumberMinor"]); $NumberOfVolumes = value_or_null($attributes["NumberOfVolumes"]); $VolumeNumber = value_or_null($attributes["VolumeNumber"]); $SideID = value_or_null($attributes["SideID"]); if ($Submitter == DEFSUBMITTER) { $Submitter = null; } // Check if dataset exists $found = FALSE; /* Feature #884: deactivated unstable feature for rev 0.40 $strSQL = "SELECT `idDVDVMGM`, `RowLastChanged`, `RowCreationDate`, `Submitter`, `SubmitterIP` FROM `DVDVMGM` ". "WHERE `Hash` = '" . $Hash . "' AND `Active` = 1 " . "ORDER BY `Revision` DESC;"; $rsDVDVMGM = query_server($mysqli, $strSQL); if (is_array($Cols = $rsDVDVMGM->fetch_row())) { $idDVDVMGM = $Cols[0]; $RowLastChanged = $Cols[1]; $RowCreationDate = $Cols[2]; $LastSubmitter = $Cols[3]; $LastSubmitterIP = $Cols[4]; // TODO: maybe check submission time if ($Submitter == $LastSubmitter && $SubmitterIP == $LastSubmitterIP) { $found = TRUE; } } $rsDVDVMGM->close(); */ if (!$found) { // Not found: insert new $strSQL = "INSERT INTO `DVDVMGM` (`Hash`, `Album`, `AlbumArtist`, `Genre`, `Cast`, `Crew`, `Director`, `Country`, `ReleaseDate`, `SpecialFeatures`, `EAN_UPC`, `Storyline`, `Remarks`, `Submitter`, `SubmitterIP`, `Client`, `Keywords`, `RegionProhibited1`, `RegionProhibited2`, `RegionProhibited3`, `RegionProhibited4`, `RegionProhibited5`, `RegionProhibited6`, `RegionProhibited7`, `RegionProhibited8`, `VersionNumberMajor`, `VersionNumberMinor`, `NumberOfVolumes`, `VolumeNumber`, `SideID`, `OriginalAlbum`, `Screenplay`, `Producer`, `Editing`, `Cinematography`, `OriginalLanguage`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);"; $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing insert statement for DVDVMGM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->bind_param("<API key>", $Hash, $Album, $AlbumArtist, $Genre, $Cast, $Crew, $Director, $Country, $ReleaseDate, $SpecialFeatures, $EAN_UPC, $Storyline, $Remarks, $Submitter, $SubmitterIP, $Client, $Keywords, $RegionProhibited1, $RegionProhibited2, $RegionProhibited3, $RegionProhibited4, $RegionProhibited5, $RegionProhibited6, $RegionProhibited7, $RegionProhibited8, $VersionNumberMajor, $VersionNumberMinor, $NumberOfVolumes, $VolumeNumber, $SideID, $OriginalAlbum, $Screenplay, $Producer, $Editing, $Cinematography, $OriginalLanguage)) { $ResponseText = "Error binding parameters for DVDVMGM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); $stmt = null; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->execute()) { $ResponseText = "Error executing statement on DVDVMGM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); $stmt = null; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } $idDVDVMGM = $mysqli->insert_id; $stmt->close(); $stmt = null; // Physical structure $tagPhysical = $tagDVDVMGM->physical; foreach ($tagPhysical->DVDVTS as $tagDVDVTS) { // Insert DVDVTS (Video Title Set) $attributes = $tagDVDVTS->attributes(); $TitleSetNo = $attributes["TitleSetNo"]; $VersionNumberMajor = value_or_null($attributes["VersionNumberMajor"]); $VersionNumberMinor = value_or_null($attributes["VersionNumberMinor"]); $strSQL = "INSERT INTO `DVDVTS` (`DVDVMGMKey`, `TitleSetNo`, `VersionNumberMajor`, `VersionNumberMinor`) VALUES (?, ?, ?, ?);"; $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing insert statement for DVDVTS table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->bind_param("iiii", $idDVDVMGM, $TitleSetNo, $VersionNumberMajor, $VersionNumberMinor)) { $ResponseText = "Error binding parameters for DVDVTS table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->execute()) { $ResponseText = "Error executing statement on DVDVTS table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } $idDVDVTS = $mysqli->insert_id; $stmt->close(); foreach ($tagDVDVTS->DVDPGC as $tagDVDPGC) { // Insert DVDPGC (Program Chain) $attributes = $tagDVDPGC->attributes(); $ProgramChainNo = value_or_null($attributes["Number"]); $EntryPGC = value_or_null($attributes["EntryPGC"]); $strSQL = "INSERT INTO `DVDPGC` (`DVDVTSKey`, `ProgramChainNo`, `EntryPGC`) VALUES (?, ?, ?);"; $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing insert statement for DVDPGC table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->bind_param("iii", $idDVDVTS, $ProgramChainNo, $EntryPGC)) { $ResponseText = "Error binding parameters for DVDPGC table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->execute()) { $ResponseText = "Error executing statement on DVDPGC table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } $idDVDPGC = $mysqli->insert_id; $stmt->close(); foreach ($tagDVDPGC->DVDPROGRAM as $tagDVDPROGRAM) { // Insert DVDPGC (Program) $attributes = $tagDVDPROGRAM->attributes(); $ProgramNo = value_or_null($attributes["Number"]); $strSQL = "INSERT INTO `DVDPROGRAM` (`DVDPGCKey`, `ProgramNo`) VALUES (?, ?);"; $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing insert statement for chapter table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->bind_param("ii", $idDVDPGC, $ProgramNo)) { $ResponseText = "Error binding parameters for chapter table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->execute()) { $ResponseText = "Error executing statement on chapter table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } $idDVDPROGRAM = $mysqli->insert_id; $stmt->close(); foreach ($tagDVDPROGRAM->DVDCELL as $tagDVDCELL) { // Insert DVDCELL (Cell) $attributes = $tagDVDCELL->attributes(); $CellNo = value_or_null($attributes["Number"]); $CellType = value_or_null($attributes["CellType"]); $BlockType = value_or_null($attributes["BlockType"]); $SeamlessMultiplex = value_or_null($attributes["SeamlessMultiplex"]); $Interleaved = value_or_null($attributes["Interleaved"]); $SCRdiscontinuity = value_or_null($attributes["SCRdiscontinuity"]); $<API key> = value_or_null($attributes["<API key>"]); $VOBStillMode = value_or_null($attributes["VOBStillMode"]); $StopsTrickPlay = value_or_null($attributes["StopsTrickPlay"]); $CellStillTime = value_or_null($attributes["CellStillTime"]); $CellCommand = value_or_null($attributes["CellCommand"]); $PlayTime = value_or_null($attributes["PlayTime"]); $FrameRate = value_or_null($attributes["FrameRate"]); $<API key> = value_or_null($attributes["<API key>"]); $FirstILVUEndSector = value_or_null($attributes["FirstILVUEndSector"]); $LastVOBUStartSector = value_or_null($attributes["LastVOBUStartSector"]); $LastVOBUEndSector = value_or_null($attributes["LastVOBUEndSector"]); $VOBidn = value_or_null($attributes["VOBidn"]); $CELLidn = value_or_null($attributes["CELLidn"]); $NumberOfVOBIds = value_or_null($attributes["NumberOfVOBIds"]); $strSQL = "INSERT INTO `DVDCELL` (`DVDPROGRAMKey`, `CellNo`, `CellType`, `BlockType`, `SeamlessMultiplex`, `Interleaved`, `SCRdiscontinuity`, `<API key>`, `VOBStillMode`, `StopsTrickPlay`, `CellStillTime`, `CellCommand`, `PlayTime`, `FrameRate`, `<API key>`, `FirstILVUEndSector`, `LastVOBUStartSector`, `LastVOBUEndSector`, `VOBidn`, `CELLidn`, `NumberOfVOBIds`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);"; $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing insert statement for DVDCELL table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->bind_param("<API key>", $idDVDPROGRAM, $CellNo, $CellType, $BlockType, $SeamlessMultiplex, $Interleaved, $SCRdiscontinuity, $<API key>, $VOBStillMode, $StopsTrickPlay, $CellStillTime, $CellCommand, $PlayTime, $FrameRate, $<API key>, $FirstILVUEndSector, $LastVOBUStartSector, $LastVOBUEndSector, $VOBidn, $CELLidn, $NumberOfVOBIds)) { $ResponseText = "Error binding parameters for DVDCELL table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->execute()) { $ResponseText = "Error executing statement on DVDCELL table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } $idDVDCELL = $mysqli->insert_id; $stmt->close(); foreach ($tagDVDCELL->DVDUNIT as $tagDVDUNIT) { // Insert DVDUNIT (Unit) $attributes = $tagDVDUNIT->attributes(); $UnitNo = value_or_null($attributes["Number"]); $StartSector = value_or_null($attributes["StartSector"]); $EndSector = value_or_null($attributes["EndSector"]); $strSQL = "INSERT INTO `DVDUNIT` (`DVDCELLKey`, `UnitNo`, `StartSector`, `EndSector`) VALUES (?, ?, ?, ?);"; $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing insert statement for DVDUNIT table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->bind_param("iiii", $idDVDCELL, $UnitNo, $StartSector, $EndSector)) { $ResponseText = "Error binding parameters for DVDUNIT table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->execute()) { $ResponseText = "Error executing statement on DVDUNIT table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } //$idDVDUNIT = $mysqli->insert_id; $stmt->close(); } } } } // DVDVIDEOSTREAM foreach ($tagDVDVTS->DVDVIDEOSTREAM as $tagDVDVIDEOSTREAM) { addVideoStream($mysqli, $tagDVDVIDEOSTREAM, null, $idDVDVTS); } // DVDAUDIOSTREAM foreach ($tagDVDVTS->DVDAUDIOSTREAM as $tagDVDAUDIOSTREAM) { addAudioStream($mysqli, $tagDVDAUDIOSTREAM, null, $idDVDVTS); } // DVDAUDIOSTREAMEX foreach ($tagDVDVTS->DVDAUDIOSTREAMEX as $audiostreamExTag) { addAudioStreamEx($mysqli, $audiostreamExTag, $idDVDVTS); } // DVDSUBPICSTREAM foreach ($tagDVDVTS->DVDSUBPICSTREAM as $tagDVDSUBPICSTREAM) { addSubpictureStream($mysqli, $tagDVDSUBPICSTREAM, null, $idDVDVTS); } // Fileset foreach ($tagDVDVTS->DVDFILE as $tagDVDFILE) { addFileset($mysqli, $tagDVDFILE, null, $idDVDVTS); } } // Virtual structure $tagVirtual = $tagDVDVMGM->virtual; foreach ($tagVirtual->DVDPTTVMG as $tagDVDPTTVMG) { // Insert DVDPTTVMG (Video Title Set) $attributes = $tagDVDPTTVMG->attributes(); $Title = value_or_null($tagDVDPTTVMG->Title); $TitleSetNo = value_or_null($attributes["TitleSetNo"]); $PlaybackType = value_or_null($attributes["PlaybackType"]); $NumberOfVideoAngles = value_or_null($attributes["NumberOfVideoAngles"]); $ParentalMgmMaskVMG = value_or_null($attributes["ParentalMgmMaskVMG"]); $ParentalMgmMaskVTS = value_or_null($attributes["ParentalMgmMaskVTS"]); $NumberOfVideoAngles = value_or_null($attributes["NumberOfVideoAngles"]); $VideoTitleSetNo = value_or_null($attributes["VideoTitleSetNo"]); $TitleNo = value_or_null($attributes["TitleNo"]); $strSQL = "INSERT INTO `DVDPTTVMG` (`DVDVMGMKey`, `TitleSetNo`, `Title`, `PlaybackType`, `NumberOfVideoAngles`, `ParentalMgmMaskVMG`, `ParentalMgmMaskVTS`, `VideoTitleSetNo`, `TitleNo`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?);"; $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing insert statement for DVDPTTVMG table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->bind_param("iisiiiiii", $idDVDVMGM, $TitleSetNo, $Title, $PlaybackType, $NumberOfVideoAngles, $ParentalMgmMaskVMG, $ParentalMgmMaskVTS, $VideoTitleSetNo, $TitleNo)) { $ResponseText = "Error binding parameters for DVDPTTVMG table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->execute()) { $ResponseText = "Error executing statement on DVDPTTVMG table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } $idDVDPTTVMG = $mysqli->insert_id; $stmt->close(); foreach ($tagDVDPTTVMG->DVDPTTVTS as $tagDVDPTTVTS) { // Insert DVDPTTVTS (Chapter) $attributes = $tagDVDPTTVTS->attributes(); $Title = value_or_null($tagDVDPTTVTS->Title); $Artist = value_or_null($tagDVDPTTVTS->Artist); $ProgramChainNo = value_or_null($attributes["ProgramChainNo"]); $ProgramNo = value_or_null($attributes["ProgramNo"]); $PttTitleSetNo = value_or_null($attributes["PttTitleSetNo"]); $PttChapterNo = value_or_null($attributes["Number"]); $TitleSetNo = value_or_null($attributes["TitleSetNo"]); $strSQL = "INSERT INTO `DVDPTTVTS` (`DVDPTTVMGKey`, `Artist`, `Title`, `ProgramChainNo`, `ProgramNo`, `PttTitleSetNo`, `PttChapterNo`, `TitleSetNo`) VALUES (?, ?, ?, ?, ?, ?, ?, ?);"; $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing insert statement for DVDPTTVTS table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->bind_param("issiiiii", $idDVDPTTVMG, $Artist, $Title, $ProgramChainNo, $ProgramNo, $PttTitleSetNo, $PttChapterNo, $TitleSetNo)) { $ResponseText = "Error binding parameters for DVDPTTVTS table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->execute()) { $ResponseText = "Error executing statement on DVDPTTVTS table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } //$idDVDPTTVTS = $mysqli->insert_id; $stmt->close(); } } // DVDVIDEOSTREAM foreach ($tagDVDVMGM->DVDVIDEOSTREAM as $tagDVDVIDEOSTREAM) { addVideoStream($mysqli, $tagDVDVIDEOSTREAM, $idDVDVMGM, null); } // DVDAUDIOSTREAM foreach ($tagDVDVMGM->DVDAUDIOSTREAM as $tagDVDAUDIOSTREAM) { addAudioStream($mysqli, $tagDVDAUDIOSTREAM, $idDVDVMGM, null); } // DVDSUBPICSTREAM foreach ($tagDVDVMGM->DVDSUBPICSTREAM as $tagDVDSUBPICSTREAM) { addSubpictureStream($mysqli, $tagDVDSUBPICSTREAM, $idDVDVMGM, null); } // Fileset foreach ($tagDVDVMGM->DVDFILE as $tagDVDFILE) { addFileset($mysqli, $tagDVDFILE, $idDVDVMGM, null); } } else { // Found: do an update $strSQL = "UPDATE `DVDVMGM` SET `Album` = ?, `AlbumArtist` = ?, `Genre` = ?, `Cast` = ?, `Crew` = ?, `Director` = ?, `Country` = ?, `ReleaseDate` = ?, `SpecialFeatures` = ?, `EAN_UPC` = ?, `Storyline` = ?, `Remarks` = ?, `Submitter` = ?, `SubmitterIP` = ?, `Client` = ?, `Keywords` = ?, `RegionProhibited1` = ?, `RegionProhibited2` = ?, `RegionProhibited3` = ?, `RegionProhibited4` = ?, `RegionProhibited5` = ?, `RegionProhibited6` = ?, `RegionProhibited7` = ?, `RegionProhibited8` = ?, `VersionNumberMajor` = ?, `VersionNumberMinor` = ?, `NumberOfVolumes` = ?, `VolumeNumber` = ?, `OriginalAlbum` = ?, `Screenplay` = ?, `Producer` = ?, `Editing` = ?, `Cinematography` = ?, `OriginalLanguage` = ?, `SideID` = ? WHERE `idDVDVMGM` = ?;"; $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing update statement for DVDVMGM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->bind_param("<API key>", $Album, $AlbumArtist, $Genre, $Cast, $Crew, $Director, $Country, $ReleaseDate, $SpecialFeatures, $EAN_UPC, $Storyline, $Remarks, $Submitter, $SubmitterIP, $Client, $Keywords, $RegionProhibited1, $RegionProhibited2, $RegionProhibited3, $RegionProhibited4, $RegionProhibited5, $RegionProhibited6, $RegionProhibited7, $RegionProhibited8, $VersionNumberMajor, $VersionNumberMinor, $NumberOfVolumes, $VolumeNumber, $OriginalAlbum, $Screenplay, $Producer, $Editing, $Cinematography, $OriginalLanguage, $SideID, $idDVDVMGM)) { $ResponseText = "Error binding parameters for DVDVMGM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); $stmt = null; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->execute()) { $ResponseText = "Error executing statement on DVDVMGM table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); $stmt = null; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } $stmt->close(); $stmt = null; // Physical structure $tagPhysical = $tagDVDVMGM->physical; foreach ($tagPhysical->DVDVTS as $tagDVDVTS) { // Update DVDVTS (Video Title Set) $attributes = $tagDVDVTS->attributes(); $TitleSetNo = $attributes["TitleSetNo"]; $VersionNumberMajor = value_or_null($attributes["VersionNumberMajor"]); $VersionNumberMinor = value_or_null($attributes["VersionNumberMinor"]); $idDVDVTS = getPrimaryKey($mysqli, "DVDVTS", "idDVDVTS", "`DVDVMGMKey` = $idDVDVMGM AND `TitleSetNo` = $TitleSetNo"); $strSQL = "UPDATE `DVDVTS` SET `TitleSetNo` = ?, `VersionNumberMajor` = ?, `VersionNumberMinor` = ? WHERE `idDVDVTS` = ?;"; $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing update statement for DVDVTS table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->bind_param("iiii", $TitleSetNo, $VersionNumberMajor, $VersionNumberMinor, $idDVDVTS)) { $ResponseText = "Error binding parameters for DVDVTS table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->execute()) { $ResponseText = "Error executing statement on DVDVTS table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } $stmt->close(); foreach ($tagDVDVTS->DVDPGC as $tagDVDPGC) { // Update DVDPGC (Program Chain) $attributes = $tagDVDPGC->attributes(); $ProgramChainNo = value_or_null($attributes["Number"]); $EntryPGC = value_or_null($attributes["EntryPGC"]); $idDVDPGC = getPrimaryKey($mysqli, "DVDPGC", "idDVDPGC", "`DVDVTSKey` = $idDVDVTS AND `ProgramChainNo` = $ProgramChainNo"); $strSQL = "UPDATE `DVDPGC` SET `EntryPGC` = ? WHERE `idDVDPGC` = ?;"; $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing insert statement for DVDPGC table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->bind_param("ii", $EntryPGC, $idDVDPGC)) { $ResponseText = "Error binding parameters for DVDPGC table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->execute()) { $ResponseText = "Error executing statement on DVDPGC table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } $stmt->close(); foreach ($tagDVDPGC->DVDPROGRAM as $tagDVDPROGRAM) { // Update DVDPGC (Program) $attributes = $tagDVDPROGRAM->attributes(); $ProgramNo = value_or_null($attributes["Number"]); // Nothing to update... $idDVDPROGRAM = getPrimaryKey($mysqli, "DVDPROGRAM", "idDVDPROGRAM", "`DVDPGCKey` = $idDVDPGC AND `ProgramNo` = $ProgramNo"); foreach ($tagDVDPROGRAM->DVDCELL as $tagDVDCELL) { // Update DVDCELL (Cell) $attributes = $tagDVDCELL->attributes(); $CellNo = value_or_null($attributes["Number"]); $CellType = value_or_null($attributes["CellType"]); $BlockType = value_or_null($attributes["BlockType"]); $SeamlessMultiplex = value_or_null($attributes["SeamlessMultiplex"]); $Interleaved = value_or_null($attributes["Interleaved"]); $SCRdiscontinuity = value_or_null($attributes["SCRdiscontinuity"]); $<API key> = value_or_null($attributes["<API key>"]); $VOBStillMode = value_or_null($attributes["VOBStillMode"]); $StopsTrickPlay = value_or_null($attributes["StopsTrickPlay"]); $CellStillTime = value_or_null($attributes["CellStillTime"]); $CellCommand = value_or_null($attributes["CellCommand"]); $PlayTime = value_or_null($attributes["PlayTime"]); $FrameRate = value_or_null($attributes["FrameRate"]); $<API key> = value_or_null($attributes["<API key>"]); $FirstILVUEndSector = value_or_null($attributes["FirstILVUEndSector"]); $LastVOBUStartSector = value_or_null($attributes["LastVOBUStartSector"]); $LastVOBUEndSector = value_or_null($attributes["LastVOBUEndSector"]); $VOBidn = value_or_null($attributes["VOBidn"]); $CELLidn = value_or_null($attributes["CELLidn"]); $NumberOfVOBIds = value_or_null($attributes["NumberOfVOBIds"]); $idDVDCELL = getPrimaryKey($mysqli, "DVDCELL", "idDVDCELL", "`DVDPROGRAMKey` = $idDVDPROGRAM AND `CellNo` = $CellNo"); $strSQL = "UPDATE `DVDCELL` SET `CellType` = ?, `BlockType` = ?, `SeamlessMultiplex` = ?, `Interleaved` = ?, `SCRdiscontinuity` = ?, `<API key>` = ?, `VOBStillMode` = ?, `StopsTrickPlay` = ?, `CellStillTime` = ?, `CellCommand` = ?, `PlayTime` = ?, `FrameRate` = ?, `<API key>` = ?, `FirstILVUEndSector` = ?, `LastVOBUStartSector` = ?, `LastVOBUEndSector` = ?, `VOBidn` = ?, `CELLidn` = ?, `NumberOfVOBIds` = ? WHERE `idDVDCELL` = ?;"; $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing insert statement for DVDCELL table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->bind_param("<API key>", $CellType, $BlockType, $SeamlessMultiplex, $Interleaved, $SCRdiscontinuity, $<API key>, $VOBStillMode, $StopsTrickPlay, $CellStillTime, $CellCommand, $PlayTime, $FrameRate, $<API key>, $FirstILVUEndSector, $LastVOBUStartSector, $LastVOBUEndSector, $VOBidn, $CELLidn, $NumberOfVOBIds, $idDVDCELL)) { $ResponseText = "Error binding parameters for DVDCELL table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->execute()) { $ResponseText = "Error executing statement on DVDCELL table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } $stmt->close(); foreach ($tagDVDCELL->DVDUNIT as $tagDVDUNIT) { // Update DVDUNIT (Unit) $attributes = $tagDVDUNIT->attributes(); $UnitNo = value_or_null($attributes["Number"]); $StartSector = value_or_null($attributes["StartSector"]); $EndSector = value_or_null($attributes["EndSector"]); $strSQL = "UPDATE `DVDUNIT` SET `StartSector` = ?, `EndSector` = ? WHERE `DVDCELLKey` = ? AND `UnitNo` = ?;"; $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing insert statement for DVDUNIT table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->bind_param("iiii", $StartSector, $EndSector, $idDVDCELL, $UnitNo)) { $ResponseText = "Error binding parameters for DVDUNIT table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->execute()) { $ResponseText = "Error executing statement on DVDUNIT table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } //$idDVDUNIT = $mysqli->insert_id; $stmt->close(); } } } } // DVDVIDEOSTREAM foreach ($tagDVDVTS->DVDVIDEOSTREAM as $tagDVDVIDEOSTREAM) { updateVideoStream($mysqli, $tagDVDVIDEOSTREAM, null, $idDVDVTS); } // DVDAUDIOSTREAM foreach ($tagDVDVTS->DVDAUDIOSTREAM as $tagDVDAUDIOSTREAM) { updateAudioStream($mysqli, $tagDVDAUDIOSTREAM, null, $idDVDVTS); } // DVDAUDIOSTREAMEX foreach ($tagDVDVTS->DVDAUDIOSTREAMEX as $audiostreamExTag) { updateAudioStreamEx($mysqli, $audiostreamExTag, $idDVDVTS); } // DVDSUBPICSTREAM foreach ($tagDVDVTS->DVDSUBPICSTREAM as $tagDVDSUBPICSTREAM) { <API key>($mysqli, $tagDVDSUBPICSTREAM, null, $idDVDVTS); } // Fileset foreach ($tagDVDVTS->DVDFILE as $tagDVDFILE) { updateFileset($mysqli, $tagDVDFILE, null, $idDVDVTS); } } // Virtual structure $tagVirtual = $tagDVDVMGM->virtual; foreach ($tagVirtual->DVDPTTVMG as $tagDVDPTTVMG) { // Update DVDPTTVMG (Video Title Set) $attributes = $tagDVDPTTVMG->attributes(); $Title = value_or_null($tagDVDPTTVMG->Title); $TitleSetNo = value_or_null($attributes["TitleSetNo"]); $PlaybackType = value_or_null($attributes["PlaybackType"]); $NumberOfVideoAngles = value_or_null($attributes["NumberOfVideoAngles"]); $ParentalMgmMaskVMG = value_or_null($attributes["ParentalMgmMaskVMG"]); $ParentalMgmMaskVTS = value_or_null($attributes["ParentalMgmMaskVTS"]); $NumberOfVideoAngles = value_or_null($attributes["NumberOfVideoAngles"]); $VideoTitleSetNo = value_or_null($attributes["VideoTitleSetNo"]); $TitleNo = value_or_null($attributes["TitleNo"]); $idDVDPTTVMG = getPrimaryKey($mysqli, "DVDPTTVMG", "idDVDPTTVMG", "`DVDVMGMKey` = $idDVDVMGM AND `TitleSetNo` = $TitleSetNo"); $strSQL = "UPDATE `DVDPTTVMG` SET `Title` = ?, `PlaybackType` = ?, `NumberOfVideoAngles` = ?, `ParentalMgmMaskVMG` = ?, `ParentalMgmMaskVTS` = ?, `VideoTitleSetNo` = ?, `TitleNo` = ? WHERE `idDVDPTTVMG` = ?;"; $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing insert statement for DVDPTTVMG table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->bind_param("siiiiiii", $Title, $PlaybackType, $NumberOfVideoAngles, $ParentalMgmMaskVMG, $ParentalMgmMaskVTS, $VideoTitleSetNo, $TitleNo, $idDVDPTTVMG)) { $ResponseText = "Error binding parameters for DVDPTTVMG table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->execute()) { $ResponseText = "Error executing statement on DVDPTTVMG table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } $stmt->close(); foreach ($tagDVDPTTVMG->DVDPTTVTS as $tagDVDPTTVTS) { // Update DVDPTTVTS (Chapter) $attributes = $tagDVDPTTVTS->attributes(); $Title = value_or_null($tagDVDPTTVTS->Title); $Artist = value_or_null($tagDVDPTTVTS->Artist); $ProgramChainNo = value_or_null($attributes["ProgramChainNo"]); $ProgramNo = value_or_null($attributes["ProgramNo"]); $PttTitleSetNo = value_or_null($attributes["PttTitleSetNo"]); $PttChapterNo = value_or_null($attributes["Number"]); $TitleSetNo = value_or_null($attributes["TitleSetNo"]); $strSQL = "UPDATE `DVDPTTVTS` SET `Artist` = ?, `Title` = ?, `ProgramChainNo` = ?, `ProgramNo` = ?, `PttTitleSetNo` = ?, TitleSetNo = ? WHERE `DVDPTTVMGKey` = ? AND `PttChapterNo` = ? ;"; $stmt = $mysqli->prepare($strSQL); if (!$stmt) { $ResponseText = "Error preparing insert statement for DVDPTTVTS table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->bind_param("ssiiiiii", $Artist, $Title, $ProgramChainNo, $ProgramNo, $PttTitleSetNo, $TitleSetNo, $idDVDPTTVMG, $PttChapterNo)) { $ResponseText = "Error binding parameters for DVDPTTVTS table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } if (!$stmt->execute()) { $ResponseText = "Error executing statement on DVDPTTVTS table.\nSQL Error: " . $mysqli->error . "\nSQL State: " . $mysqli->sqlstate; $stmt->close(); throw new Exception($ResponseText, XMLRESULT_SQL_ERROR); } //$idDVDPTTVTS = $mysqli->insert_id; $stmt->close(); } } // DVDVIDEOSTREAM foreach ($tagDVDVMGM->DVDVIDEOSTREAM as $tagDVDVIDEOSTREAM) { updateVideoStream($mysqli, $tagDVDVIDEOSTREAM, $idDVDVMGM, null); } // DVDAUDIOSTREAM foreach ($tagDVDVMGM->DVDAUDIOSTREAM as $tagDVDAUDIOSTREAM) { updateAudioStream($mysqli, $tagDVDAUDIOSTREAM, $idDVDVMGM, null); } // DVDSUBPICSTREAM foreach ($tagDVDVMGM->DVDSUBPICSTREAM as $tagDVDSUBPICSTREAM) { <API key>($mysqli, $tagDVDSUBPICSTREAM, $idDVDVMGM, null); } // Fileset foreach ($tagDVDVMGM->DVDFILE as $tagDVDFILE) { updateFileset($mysqli, $tagDVDFILE, $idDVDVMGM, null); } } } // Commit the transaction $rs = query_server($mysqli, "COMMIT;"); } ?>
package galois.objects.graph; import galois.objects.GObject; import galois.objects.Lockable; import galois.objects.Mappable; import galois.runtime.Replayable; /** * A node in a graph. * * @param <N> the type of the data stored in each node */ public interface GNode<N> extends Replayable, Lockable, Mappable<GNode<N>>, GObject { /** * Retrieves the node data associated with the vertex * * All the Galois runtime actions (e.g., conflict detection) will be performed when * the method is executed. * * @return the data contained in the node */ public N getData(); /** * Retrieves the node data associated with the vertex. Equivalent to {@link #getData(byte, byte)} * passing <code>flags</code> to both parameters. * * @param flags Galois runtime actions (e.g., conflict detection) that need to be executed * upon invocation of this method. See {@link galois.objects.MethodFlag} * @return the data contained in the node */ public N getData(byte flags); /** * Retrieves the node data associated with the vertex. For convenience, this method * also calls {@link GObject#access(byte)} on the returned data. * * <p>Recall that the * {@link GNode} object maintains information about the vertex and its connectivity * in the graph. This is separate from the data itself. For example, * <code>getData(MethodFlag.NONE, MethodFlag.SAVE_UNDO)</code> * does not acquire an abstract lock on the {@link GNode} (perhaps because * it was returned by a call to {@link GNode#map(util.fn.LambdaVoid)}), but it * saves undo information on the returned data in case the iteration needs to * be rolled back. * </p> * * @param nodeFlags Galois runtime actions (e.g., conflict detection) that need to be executed * upon invocation of this method on the <i>node itself</i>. * See {@link galois.objects.MethodFlag} * @param dataFlags Galois runtime actions (e.g., conflict detection) that need to be executed * upon invocation of this method on the <i>data</i> contained in the node. * See {@link galois.objects.MethodFlag} * @return the data contained in the node */ public N getData(byte nodeFlags, byte dataFlags); /** * Sets the node data. * * All the Galois runtime actions (e.g., conflict detection) will be performed when * the method is executed. * * @param d the data to be stored * @return the old data associated with the node */ public N setData(N d); /** * Sets the node data. * * @param d the data to be stored * @param flags Galois runtime actions (e.g., conflict detection) that need to be executed * upon invocation of this method. See {@link galois.objects.MethodFlag} * @return the old data associated with the node */ public N setData(N d, byte flags); }
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace SharpGraphLib { public partial class LegendControl : UserControl { List<LegendLabel> _Labels = new List<LegendLabel>(); bool <API key> = true, <API key> = true; [Category("Behavior")] [DefaultValue(true)] public bool <API key> { get { return <API key>; } set { <API key> = value;} } [Category("Behavior")] [DefaultValue(true)] public bool <API key> { get { return <API key>; } set { <API key> = value; } } bool _Autosize; internal bool Autosize { get { return _Autosize; } set { _Autosize = value; if (value) { Width = _AutoWidth; Height = _AutoHeight; } } } public LegendControl() { InitializeComponent(); } [Category("Appearance")] public string NoGraphsLabel { get { return label1.Text; } set { label1.Text = value; } } internal GraphViewer _GraphViewer; int _AutoWidth, _AutoHeight; <summary> Collection items should implement ILegendItem </summary> protected virtual System.Collections.IEnumerable Items { get { if (_GraphViewer == null) return null; return _GraphViewer.DisplayedGraphs; } } public void UpdateLegend() { foreach (LegendLabel lbl in _Labels) lbl.Dispose(); _Labels.Clear(); int i = 0; if (Items != null) { _AutoWidth = 0; foreach (ILegendItem gr in Items) { if (gr.HiddenFromLegend) continue; LegendLabel lbl = new LegendLabel { ForeColor = ForeColor }; lbl.Parent = this; lbl.SquareColor = gr.Color; lbl.Text = gr.Hint; lbl.Grayed = gr.Hidden; lbl.Left = 0; lbl.Top = i * lbl.Height + label1.Top; lbl.Width = Width; lbl.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; lbl.Tag = gr; lbl.Cursor = Cursors.Arrow; lbl.MouseClick += new MouseEventHandler(<API key>); lbl.MouseEnter += new EventHandler(<API key>); lbl.MouseLeave += new EventHandler(<API key>); lbl.MouseMove += new MouseEventHandler(lbl_MouseMove); lbl.MouseDown += new MouseEventHandler(lbl_MouseDown); _AutoWidth = Math.Max(_AutoWidth, lbl.Left + lbl.MeasureWidth() + 10); _AutoHeight = lbl.Bottom + 10; lbl.Visible = true; _Labels.Add(lbl); i++; } label1.Visible = false; } if (i == 0) { label1.Visible = true; _AutoWidth = label1.Right + 10; _AutoHeight = label1.Bottom + 10; } if (_Autosize) { Width = _AutoWidth; Height = _AutoHeight; } } protected virtual void lbl_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { Point newPoint = PointToClient((sender as Control).PointToScreen(e.Location)); OnMouseDown(new MouseEventArgs(e.Button, e.Clicks, newPoint.X, newPoint.Y, e.Delta)); } } protected virtual void lbl_MouseMove(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { Point newPoint = PointToClient((sender as Control).PointToScreen(e.Location)); OnMouseMove(new MouseEventArgs(e.Button, e.Clicks, newPoint.X, newPoint.Y, e.Delta)); } } public delegate void <API key>(ILegendItem item); public event <API key> OnLabelHilighted; LegendLabel _ActiveLabel; public ILegendItem ActiveItem { get { if (_ActiveLabel == null) return null; return _ActiveLabel.Tag as ILegendItem; } } protected override void OnMouseLeave(EventArgs e) { base.OnMouseLeave(e); _ActiveLabel = null; } void <API key>(object sender, EventArgs e) { if (!<API key>) return; LegendLabel lbl = sender as LegendLabel; lbl.BackColor = BackColor; if (OnLabelHilighted != null) OnLabelHilighted(null); } void <API key>(object sender, EventArgs e) { _ActiveLabel = sender as LegendLabel; if (!<API key>) return; LegendLabel lbl = sender as LegendLabel; lbl.BackColor = _HighlightedColor; if (OnLabelHilighted != null) OnLabelHilighted((ILegendItem)lbl.Tag); } public delegate void HandleLabelGrayed(ILegendItem graph, bool grayed); public event HandleLabelGrayed OnLabelGrayed; virtual protected void <API key>(object sender, MouseEventArgs e) { if (e.Button != MouseButtons.Left) return; if (!<API key>) return; LegendLabel label = sender as LegendLabel; label.Grayed = !label.Grayed; if (OnLabelGrayed != null) OnLabelGrayed((ILegendItem)label.Tag, label.Grayed); } private Color _HighlightedColor = Color.LemonChiffon; public System.Drawing.Color HighlightedColor { get { return _HighlightedColor; } set { _HighlightedColor = value; Invalidate(); } } } }
#include "samplesat.h" #include "memalloc.h" #include <stdio.h> #include <stdlib.h> #include <inttypes.h> #include <string.h> uint32_t num_sorts = 100; uint32_t num_consts = 1000; uint32_t buf_len = 11; #define ENABLE 0 typedef struct inclause_buffer_t { int32_t size; input_literal_t ** data; } inclause_buffer_t; static inclause_buffer_t inclause_buffer = {0, NULL}; int main(){ samp_table_t table; init_samp_table(&table); sort_table_t *sort_table = &(table.sort_table); const_table_t *const_table = &(table.const_table); pred_table_t *pred_table = &(table.pred_table); atom_table_t *atom_table = &(table.atom_table); clause_table_t *clause_table = &(table.clause_table); uint32_t i, j; char sort_num[6]; char const_num[6]; char pred_num[6]; char *buffer; for (i = 0; i < num_sorts; i++){ sprintf(sort_num, "%d", i); buffer = (char *) safe_malloc(sizeof(char)*buf_len); memcpy(buffer, "sort", buf_len); strcat(buffer, sort_num); add_sort(sort_table, buffer); } if (ENABLE){ printf("\nsort_table: size: %"PRId32", num_sorts: %"PRId32"", sort_table->size, sort_table->num_sorts); for (i = 0; i < num_sorts; i++){ buffer = sort_table->entries[i].name; printf("\nsort[%"PRIu32"]: %s; symbol_table: %"PRId32"", i, buffer, stbl_find(&(sort_table->sort_name_index), buffer)); add_sort(sort_table, buffer);//should do nothing printf("\nRe:sort[%"PRIu32"]: %s; symbol_table: %"PRId32"", i, buffer, stbl_find(&(sort_table->sort_name_index), buffer)); } } /* Now testing constants */ for (i = 0; i < num_sorts; i++){ for (j = 0; j < (num_consts/num_sorts); j++){ sprintf(const_num, "%d", i*(num_consts/num_sorts) + j); memcpy(buffer, "const", 6); strcat(buffer, const_num); add_const(const_table, buffer, sort_table, sort_table->entries[i].name); } } if (ENABLE){ for (i=0; i < num_sorts; i++){ printf("\nsort = %s", sort_table->entries[i].name); for (j = 0; j < sort_table->entries[i].cardinality; j++){ printf("\nconst = %s", const_table->entries[sort_table->entries[i].constants[j]].name); } } } /* Now testing signatures */ bool evidence = 0; char **sort_name_buffer = (char **) safe_malloc(num_sorts * sizeof(char *)); printf("\nAdding normal preds"); for (i = 0; i < num_sorts; i++){ sort_name_buffer[i] = sort_table->entries[i].name; memcpy(buffer, "pred", 5); sprintf(pred_num, "%d", i); strcat(buffer, pred_num); add_pred(pred_table, buffer, evidence, i, sort_table, sort_name_buffer); } evidence = !evidence; printf("\nAdding evidence preds"); for (j = 0; j < num_sorts; j++){ sort_name_buffer[j] = sort_table->entries[j].name; memcpy(buffer, "pred", 5); sprintf(pred_num, "%d", j+i); strcat(buffer, pred_num); add_pred(pred_table, buffer, evidence, j, sort_table, sort_name_buffer); } if (ENABLE){ for (i = 0; i < pred_table->evpred_tbl.num_preds; i++){ printf("\n evpred[%d] = ", i); buffer = pred_table->evpred_tbl.entries[i].name; printf("index(%d); ", pred_index(buffer, pred_table)); printf("%s(", buffer); for (j = 0; j < pred_table->evpred_tbl.entries[i].arity; j++){ printf(" %s, ", sort_table->entries[pred_table->evpred_tbl.entries[i].signature[j]].name); } printf(")"); } for (i = 0; i < pred_table->pred_tbl.num_preds; i++){ printf("\n pred[%d] = ", i); buffer = pred_table->pred_tbl.entries[i].name; printf("index(%d); ", pred_index(buffer, pred_table)); printf("%s(", buffer); for (j = 0; j < pred_table->pred_tbl.entries[i].arity; j++){ printf(" %s, ", sort_table->entries[pred_table->pred_tbl.entries[i].signature[j]].name); } printf(")"); } } /* Now adding evidence atoms */ input_atom_t * atom_buffer = (input_atom_t *) safe_malloc(101 * sizeof(char *)); int32_t index; for (i = 0; i < pred_table->evpred_tbl.num_preds; i++){ atom_buffer->pred = pred_table->evpred_tbl.entries[i].name; printf("\nBuilding atom[%d]: %s(", i, atom_buffer->pred); for(j = 0; j < pred_table->evpred_tbl.entries[i].arity; j++){ index = sort_table->entries[pred_table->evpred_tbl.entries[i].signature[j]].constants[0]; buffer = const_table->entries[index].name; printf("[%d]%s,", index, buffer); atom_buffer->args[j] = buffer; } printf(")"); add_atom(&table, atom_buffer); } if (ENABLE){ for (i = 0; i < atom_table->num_vars; i++){ printf("\natom[%d] = %d(", i, atom_table->atom[i]->pred); for (j = 0; j < pred_table->evpred_tbl.entries[-atom_table->atom[i]->pred].arity; j++){ printf("%d,", atom_table->atom[i]->args[j]); } printf(")"); printf("\nassignment[%d] = %d", i, atom_table->assignment[i]); } for (i = 0; i < pred_table->evpred_tbl.num_preds; i++){ printf("\n"); for (j = 0; j < pred_table->evpred_tbl.entries[i].num_atoms; j++){ printf("%d", pred_table->evpred_tbl.entries[i].atoms[j]); } } } /* Now adding atoms */ int32_t numvars = atom_table->num_vars; for (i = 0; i < pred_table->pred_tbl.num_preds; i++){ atom_buffer->pred = pred_table->pred_tbl.entries[i].name; printf("\nBuilding atom[%d]: %s(", i, atom_buffer->pred); for(j = 0; j < pred_table->pred_tbl.entries[i].arity; j++){ index = sort_table->entries[pred_table->pred_tbl.entries[i].signature[j]].constants[0]; buffer = const_table->entries[index].name; printf("[%d]%s,", index, buffer); atom_buffer->args[j] = buffer; } printf(")"); add_atom(&table, atom_buffer); } if (ENABLE){ for (i = numvars; i < atom_table->num_vars; i++){ printf("\natom[%d] = %d(", i, atom_table->atom[i]->pred); for (j = 0; j < pred_table->pred_tbl.entries[atom_table->atom[i]->pred].arity; j++){ printf("%d,", atom_table->atom[i]->args[j]); } printf(")"); printf("\nassignment[%d] = %d", i, atom_table->assignment[i]); } for (i = 0; i < pred_table->pred_tbl.num_preds; i++){ printf("\n"); for (j = 0; j < pred_table->pred_tbl.entries[i].num_atoms; j++){ printf("%d", pred_table->pred_tbl.entries[i].atoms[j]); } } } /* * Adding clauses */ double weight = 0; j = pred_table->pred_tbl.num_preds + 1; inclause_buffer.data = (input_literal_t **) safe_malloc(j * sizeof(input_literal_t *)); inclause_buffer.size = j; for (i = 0; i < j; i++){ inclause_buffer.data[i] = NULL; } bool negate = false; for (i = 0; i < pred_table->pred_tbl.num_preds-1; i++){ inclause_buffer.data[i] = (input_literal_t *) safe_malloc(sizeof(input_literal_t) + i*sizeof(char *)); inclause_buffer.data[i]->neg = !inclause_buffer.data[i]->neg; inclause_buffer.data[i]->neg = negate; negate = !negate; inclause_buffer.data[i]->atom.pred = pred_table->pred_tbl.entries[i+1].name; for (j = 0; j < i; j++){ index = sort_table->entries[pred_table->pred_tbl.entries[i+1].signature[j]].constants[0]; inclause_buffer.data[i]->atom.args[j] = const_table->entries[index].name; } weight += .25; add_clause(&table, inclause_buffer.data, weight); } print_clauses(clause_table); print_atoms(atom_table, pred_table, const_table); return 1; }
// I B E X // File : ibex_DoubleHeap.h // Author : Gilles Chabert, Jordan Ninin // Created : Sep 12, 2014 // Last Update : Dec 25, 2017 #ifndef <API key> #define <API key> #include "ibex_SharedHeap.h" #include "ibex_Random.h" namespace ibex { /** * \brief Double-heap */ template<class T> class DoubleHeap { public: /** * \brief Create a double heap * * \param cost1 - cost function for the first heap * \param <API key> - whether this cost is recalculated when sorting * \param cost2 - cost function for the second heap * \param <API key> - whether this cost is recalculated when sorting * \param critpr - probability to chose the second heap as an integer in [0,100] (default value 50). * Value 0 or correspond to use a single criterion for node selection * > 0 = only the first heap * > 100 = only the second heap. */ DoubleHeap(CostFunc<T>& cost1, bool <API key>, CostFunc<T>& cost2, bool <API key>, int critpr=50); /** * \brief Copy constructor. */ explicit DoubleHeap(const DoubleHeap& dhcp, bool deep_copy=false); /** * \brief Flush the heap. * * All the remaining data will be *deleted*. */ void flush(); /** * \brief Clear the heap. * * All the remaining data will be *removed* without being *deleted*. */ void clear(); /** \brief Return the size of the buffer. */ unsigned int size() const; /** \brief Return true if the buffer is empty. */ bool empty() const; /** \brief Push new data on the heap. */ void push(T* data); /** \brief Pop data from the stack and return it.*/ T* pop(); /** \brief Pop data from the first heap and return it.*/ T* pop1(); /** \brief Pop data from the second heap and return it.*/ T* pop2(); /** \brief Return next data (but does not pop it).*/ T* top() const; /** \brief Return next data of the first heap (but does not pop it).*/ T* top1() const; /** \brief Return next data of the second heap (but does not pop it).*/ T* top2() const; /** * \brief Return the minimum (the criterion for the first heap) * * Complexity: o(1) */ double minimum() const; /** * \brief Return the first minimum (the criterion for the first heap) * * Complexity: o(1) */ double minimum1() const; /** * \brief Return the second minimum (the criterion for the second heap) * * Complexity: o(1) */ double minimum2() const; /** * \brief Contract the heap * * Removes (and deletes) from the two heaps all the data * with a cost (according to the cost function of the first heap) * that is greater than \a loup1. * * The costs of the first heap are assumed to be up-to-date. * * TODO: in principle we should implement the symmetric * case where the contraction is performed with respect * to the cost of the second heap. */ void contract(double loup1); /** * \brief Delete this */ virtual ~DoubleHeap(); template<class U> friend std::ostream& operator<<(std::ostream& os, const DoubleHeap<U>& heap); protected: /** Count the number of nodes pushed since * the object is created. */ unsigned int nb_nodes; /** the first heap */ SharedHeap<T> *heap1; /** the second heap */ SharedHeap<T> *heap2; /** Probability to choose the second * (see details in the constructor) */ const int critpr; /** Current selected heap. */ mutable int current_heap_id; /** * Used in the contract function by recursivity * * \param heap: the new heap1 under construction (will * eventually replace the current heap1). */ void contract_rec(double new_loup, HeapNode<T>* node, SharedHeap<T>& heap, bool percolate); private: /** * Erase all the subnodes of node (including itself) in the first heap * and manage the impact on the second heap. * If "percolate" is true, the second heap is left in a correct state. * Otherwise, the second heap has a binary tree structure but not sorted * anymore. Therefore, "sort" should be called on the second heap. * * So the heap structure is maintained for the second heap * but not the first one. The reason is that this function is called * either by "contract" or "flush". "contract" will build a new heap from scratch. */ void erase_subnodes(HeapNode<T>* node, bool percolate); std::ostream& print(std::ostream& os) const; }; template<class T> DoubleHeap<T>::DoubleHeap(CostFunc<T>& cost1, bool <API key>, CostFunc<T>& cost2, bool <API key>, int critpr) : nb_nodes(0), heap1(new SharedHeap<T>(cost1,<API key>,0)), heap2(new SharedHeap<T>(cost2,<API key>,1)), critpr(critpr), current_heap_id(0) { } template<class T> DoubleHeap<T>::DoubleHeap(const DoubleHeap &dhcp, bool deep_copy) : nb_nodes(dhcp.nb_nodes), heap1(NULL), heap2(NULL), critpr(dhcp.critpr), current_heap_id(dhcp.current_heap_id) { heap1 = new SharedHeap<T>(*dhcp.heap1, 2, deep_copy); std::vector<HeapElt<T>*> p = heap1->elt(); heap2 = new SharedHeap<T>(dhcp.heap2->costf, dhcp.heap2-><API key>, dhcp.heap2->heap_id); while(!p.empty()) { heap2->push_elt(p.back()); p.pop_back(); } } template<class T> DoubleHeap<T>::~DoubleHeap() { clear(); // what for? if (heap1) delete heap1; if (heap2) delete heap2; } template<class T> void DoubleHeap<T>::flush() { if (nb_nodes>0) { heap1->clear(SharedHeap<T>::NODE); heap2->clear(SharedHeap<T>::NODE_ELT_DATA); nb_nodes=0; } } template<class T> void DoubleHeap<T>::clear() { if (nb_nodes>0) { heap1->clear(SharedHeap<T>::NODE); heap2->clear(SharedHeap<T>::NODE_ELT); nb_nodes=0; } } template<class T> unsigned int DoubleHeap<T>::size() const { assert(heap1->size()==heap2->size()); return nb_nodes; } template<class T> void DoubleHeap<T>::contract(double new_loup1) { if (nb_nodes==0) return; SharedHeap<T>* copy1 = new SharedHeap<T>(heap1->costf, heap1-><API key>, 0); contract_rec(new_loup1, heap1->root, *copy1, !heap2-><API key>); heap1->root = copy1->root; heap1->nb_nodes = copy1->size(); nb_nodes = copy1->size(); copy1->root = NULL; copy1->nb_nodes=0;// avoid to delete heap1 with copy1 delete copy1; if (heap2-><API key>) heap2->sort(); assert(nb_nodes==heap2->size()); assert(nb_nodes==heap1->size()); assert(heap1->heap_state()); assert(!heap2 || heap2->heap_state()); } template<class T> void DoubleHeap<T>::contract_rec(double new_loup1, HeapNode<T>* node, SharedHeap<T>& heap, bool percolate) { // the cost are assumed to be up-to-date for the 1st heap if (node->is_sup(new_loup1, 0)) { // we must remove from the other heap all the sub-nodes if (heap2) erase_subnodes(node, percolate); } else { heap.push_elt(node->elt); if (node->left) contract_rec(new_loup1, node->left, heap, percolate); if (node->right) contract_rec(new_loup1, node->right, heap, percolate); delete node; } } template<class T> void DoubleHeap<T>::erase_subnodes(HeapNode<T>* node, bool percolate) { if (node->left) erase_subnodes(node->left, percolate); if (node->right) erase_subnodes(node->right, percolate); if (!percolate) // there is no need to update the order now in the second heap // since all costs will have to be recalculated. // The heap2 will be sorted at the end (see contract) heap2-><API key>(node->elt->holder[1]); else heap2->erase_node(node->elt->holder[1]); if (node->elt->data) delete node->elt->data; delete node->elt; delete node; } template<class T> bool DoubleHeap<T>::empty() const { // if one buffer is empty, the other is also empty return (nb_nodes==0); } template<class T> void DoubleHeap<T>::push(T* data) { HeapElt<T>* elt; if (heap2) { elt = new HeapElt<T>(data, heap1->cost(*data), heap2->cost(*data)); } else { elt = new HeapElt<T>(data, heap1->cost(*data)); } // the data is put into the first heap heap1->push_elt(elt); if (heap2) heap2->push_elt(elt); nb_nodes++; } template<class T> T* DoubleHeap<T>::pop() { assert(size()>0); //std::cout << " \n\n Heap1=" << (*heap1); // Select the heap HeapElt<T>* elt; if (current_heap_id==0) { elt = heap1->pop_elt(); if (heap2) heap2->erase_node(elt->holder[1]); } else { elt = heap2->pop_elt(); heap1->erase_node(elt->holder[0]); } T* data = elt->data; elt->data=NULL; // avoid the data to be deleted with the element delete elt; nb_nodes assert(heap1->heap_state()); assert(!heap2 || heap2->heap_state()); // select the heap if (RNG::rand() % 100 >= static_cast<unsigned>(critpr)) { current_heap_id=0; } else { current_heap_id=1; } return data; } template<class T> T* DoubleHeap<T>::pop1() { // the first heap is used current_heap_id=0; return pop(); } template<class T> T* DoubleHeap<T>::pop2() { // the second heap is used current_heap_id=1; return pop(); } template<class T> T* DoubleHeap<T>::top() const { assert(size()>0); if (current_heap_id==0) { return heap1->top(); } else { // the second heap is used return heap2->top(); } } template<class T> T* DoubleHeap<T>::top1() const { // the first heap is used current_heap_id=0; return heap1->top(); } template<class T> T* DoubleHeap<T>::top2() const { // the second heap is used current_heap_id=1; return heap2->top(); } template<class T> inline double DoubleHeap<T>::minimum() const { return heap1->minimum(); } template<class T> inline double DoubleHeap<T>::minimum1() const { return heap1->minimum(); } template<class T> inline double DoubleHeap<T>::minimum2() const { return heap2->minimum(); } template<class T> std::ostream& DoubleHeap<T>::print(std::ostream& os) const{ if (this->empty()) { os << " EMPTY "; os<<std::endl; } else { os << "First Heap: "<<std::endl; heap1->print(os); os<<std::endl; os << "Second Heap: "<<std::endl; heap2->print(os); os<<std::endl; } return os; } template<class T> std::ostream& operator<<(std::ostream& os, const DoubleHeap<T>& heap) { return heap.print(os); } } // namespace ibex #endif // <API key>
package com.finance.pms.events.pounderationrules; import java.util.HashMap; import com.finance.pms.admin.install.logging.MyLogger; import com.finance.pms.datasources.shares.Stock; import com.finance.pms.events.SymbolEvents; import com.finance.pms.events.Validity; public class <API key> extends <API key> { private static final long serialVersionUID = 573802685420097964L; private static MyLogger LOGGER = MyLogger.getLogger(<API key>.class); private HashMap<Stock, Validity> tuningValidityList; public <API key>(Integer sellThreshold, Integer buyThreshold, HashMap<Stock, Validity> tuningValidityList) { super(sellThreshold, buyThreshold); this.tuningValidityList = tuningValidityList; } @Override public int compare(SymbolEvents o1, SymbolEvents o2) { SymbolEvents se1 = o1; SymbolEvents se2 = o2; PonderationRule p1 = new <API key>(sellThreshold, buyThreshold, tuningValidityList); PonderationRule p2 = new <API key>(sellThreshold, buyThreshold, tuningValidityList); return compareCal(se1, se2, p1, p2); } @Override public Float finalWeight(SymbolEvents symbolEvents) { Validity validity = tuningValidityList.get(symbolEvents.getStock()); boolean isValid = false; if (validity != null) { isValid = validity.equals(Validity.SUCCESS); } else { LOGGER.warn("No validity information found for " + symbolEvents.getStock() + " while parsing events " + symbolEvents + ". Neural trend was not calculated for that stock."); } if (isValid) { return super.finalWeight(symbolEvents); } else { return 0.0f; } } @Override public Signal initSignal(SymbolEvents symbolEvents) { return new <API key>(symbolEvents.getEventDefList()); } @Override protected void postCondition(Signal signal) { <API key> LVSignal = (<API key>) signal; //Updating cumulative event signal with Bull Bear neural events. switch (LVSignal.getNbTrendChange()) { case 0 : //No event detected break; case 1 : //One Type of Event, no yoyo : weight = sum(cumulative events) + bullish - bearish signal.setSignalWeight(signal.getSignalWeight() + LVSignal.getNbBullish() - LVSignal.getNbBearish()); break; default : //Yoyo, Bull/Bear, we ignore the signal LOGGER.warn("Yo yo trend detected."); break; } } }
package eu.diversify.disco.cloudml; import eu.diversify.disco.population.diversity.TrueDiversity; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class Options { private static final String JSON_FILE_NAME = "[^\\.]*\\.json$"; private static final String DOUBLE_LITERAL = "((\\+|-)?([0-9]+)(\\.[0-9]+)?)|((\\+|-)?\\.?[0-9]+)"; public static final String ENABLE_GUI = "-gui"; public static Options <API key>(String... arguments) { Options extracted = new Options(); for (String argument : arguments) { if (isJsonFile(argument)) { extracted.addDeploymentModel(argument); } else if (isDouble(argument)) { extracted.setReference(Double.parseDouble(argument)); } else if (isEnableGui(argument)) { extracted.setGuiEnabled(true); } else { throw new <API key>("Unknown argument: " + argument); } } return extracted; } private static boolean isJsonFile(String argument) { return argument.matches(JSON_FILE_NAME); } private static boolean isDouble(String argument) { return argument.matches(DOUBLE_LITERAL); } private static boolean isEnableGui(String argument) { return argument.matches(ENABLE_GUI); } private boolean guiEnabled; private final List<String> deploymentModels; private double reference; public Options() { this.guiEnabled = false; this.deploymentModels = new ArrayList<String>(); this.reference = 0.75; } public boolean isGuiEnabled() { return guiEnabled; } public void setGuiEnabled(boolean guiEnabled) { this.guiEnabled = guiEnabled; } public double getReference() { return reference; } public void setReference(double setPoint) { this.reference = setPoint; } public List<String> getDeploymentModels() { return Collections.unmodifiableList(deploymentModels); } public void addDeploymentModel(String pathToModel) { this.deploymentModels.add(pathToModel); } public void <API key>() { final CloudMLController controller = new CloudMLController(new TrueDiversity().normalise()); if (guiEnabled) { startGui(controller); } else { startCommandLine(controller); } } private void startGui(final CloudMLController controller) { java.awt.EventQueue.invokeLater(new Runnable() { @Override public void run() { final Gui gui = new Gui(controller); gui.setReference(reference); gui.setFileToLoad(deploymentModels.get(0)); gui.setVisible(true); } }); } private void startCommandLine(final CloudMLController controller) { final CommandLine commandLine = new CommandLine(controller); for (String deployment : getDeploymentModels()) { commandLine.controlDiversity(deployment, reference); } } }
using iTextSharp.text; namespace PdfRpt.VectorCharts { <summary> BarChartItem </summary> public class BarChartItem { <summary> BarChartItem </summary> public BarChartItem() { } <summary> BarChartItem </summary> <param name="value">Value of the chart's item.</param> <param name="label">Label of the item.</param> <param name="color">Color of the item.</param> public BarChartItem(double value, string label, BaseColor color) { Value = value; Label = label; Color = color; } <summary> BarChartItem </summary> <param name="value">Value of the chart's item.</param> <param name="label">Label of the item.</param> <param name="color">Color of the item.</param> public BarChartItem(double value, string label, System.Drawing.Color color) { Value = value; Label = label; Color = new BaseColor(color.ToArgb()); } <summary> Value of the chart's item. </summary> public double Value { set; get; } <summary> Label of the item. </summary> public string Label { set; get; } <summary> Color of the item. </summary> public BaseColor Color { set; get; } } }